Fix old-style section links and the table of contents.