Fix anchors in headings and TOC of HTML output.