Steps to reproduce:
Create a Confluence page and insert a heading on it
Create a second Confluence page and insert the previous page two times in this page with the Include Page macro. Add some placeholder text in between these two included pages
Export the page from step 2 with the "Documentation" template in Scroll PDF Exporter
The table of contents in the exported PDF displays the correct page numbers for the two headings and links to them correctly.
The table of contents links to the first instance of the included heading twice. The page number that is displayed in the ToC is that of the first page as well.