Add test to prove issue when saving invalid tree data
Fix test by checking against an empty array instead of `false`
Merge pull request #2557 from rchavik/2.4-save-tree-invalid-scope

2.4 save tree invalid scope