Forgotten assertion in test_should_be_leaf which caused false negative.
Fix missing set_leaf() for leaf nodes in reference tree loader.