Maintain the overall document flow while extracting the nodes children for rewrapping