For now, I'll use this as a placeholder task for a bunch of TOC placement edge cases in Parsoid.
- See this viwiki page. Effectively, Parsoid adds the TOC marker to the end of the page because the lead section wraps the whole page because all other sections are embedded in a table. Strictly speaking that is the right section wrapping output, but the heuristic for adding the TOC marker (add before the lastChild of the lead section) doesn't work in this case.. For vector 2022, this bug doesn't matter because the TOC is pulled out to the size anyway, but it will matter for skins that display TOC inline.
- See Parsoid has a TOC whereas there is no TOC with current rendering. Again, some heuristic determining TOC placement failed here.