Fix again what was supposed to be fixed in PR#14101.

The initial problem was, that the `<li>` elements for the JS-generated
TOC weren't placed inside `<ul></ul>`, but after it.