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

Fixed TreeBehavior::recover() when using scope. 

Fixes #4062.
simplify tests
add missing create() for creating a new record.
Merge pull request #1658 from dereuromark/master-tests

correct and simplify tests
Use array_key_exists instead of isset()

This allows contains() to work with null values.

Fixes #4083