Use Node.SetChild(Parent) instead of `Node.ParentNode = Parent;`