Fix bug that caused parent relationships to disconnect when editing a page