Add back the check for the node already having a parent in the layout controller, should not have removed that.