Master Document, Index/PDF Page Numbers Don't Match

I have a large ODM document.
When I export the document to PDF the references work and the PDF index
(table of contents) works correctly (page numbers correspond to
document pages).
However the table of contents included in the document - generated
using the Table of Contents feature - is all off my a few pages.

see
http://www.wmmi.net/documents/LibreOfficePageNumbersTOCIssue.20211022.png

LibreOffice 7.1.5.2

Hi Adam,

did you run Tools → Update → Update All before exporting the whole
content to the *.pdf-document?

I have created the German Base Handbuch with a Master Document, contains
12 diffent *.odt-files. Works right here without problems with nearly
650 pages.

Regards

Robert

Crossposting (?):

https://ask.libreoffice.org/t/index-pdf-page-numbers-dont-match/69589