The node you are looking for is at Texinfo::Transformations ($root_content, $added_sections) = fill_gaps_in_sectioning($tree).