Fix delete_node if object is managed in two different trees