Fix a bug in TreeNode deserializer