Cross chapter references worked for some chapters but then got broken
I am encountering a strange issue. My main asciidoc file is like this:
in every chapter I have following code in the beginning:
in common-settings.adoc I have following among other things:
With this setup my cross chapter references appeared correctly until Chapter 6. But from Chapter 7 they are broken. For example, I have a cross reference to Listing 4.14 which appears as Listing 7.14. Note that the number following the chapter number is correct and if I click on the cross reference it takes me to correct position in the PDF. But the chapter number appears incorrectly as 7 instead of 4.
Does anyone know what's going on here and how to fix it?