Inserting a script trigger the insertion of the children first before triggering the parent