Fixed TreeBehavior::recover() when using scope. Fixes #4062.
Merge pull request #1657 from ADmad/bugfix/tree

Fixed TreeBehavior::recover() when using scope. 

Fixes #4062.