org-element: Fix re-parenting during cache synchronization