Fixes parent assignation when replacing node with expanded tree