Fix error when adding child to tab menu pane.