fix duplicate anchor names, and broken anchor links from the TOC