Adding two entity references at the same time breaks the tree