Why am I seeing duplicate “ghost” headings in the document map side panel in Microsoft Word?

In Microsoft Word, in the document map side panel, I can view all the headings in my document.

However, at the end of the headings list in the side panel, a few headings from earlier in the document repeat.

In other words, the headings appear twice — once where they should earlier in the document, and then again as “ghost” headings at the end of the headings list. There is no content associated with these duplicate headings — clicking on them takes me to no text in the document, since that text does not exist.