Preserve order of sections and patterns