Improved handling of section breaks (for section extraction/replacement)