Fixed numbering sequence for handle_section_refs