Improved how headings are inserted, so that the undo history is not polluted with too many irrelevant changes.