Report Module - Dynamic Table of Contents

I am looking into getting a table of contents showing the pages of when certain data sources datakeys have been used. So far PGriffith's solution from 4 years ago does work wonders. The only thing that I am struggling with is that the generated pages are offset by 1 for some reason.
Is there another way to accomplish dynamic page references for creating a table of contents for reports that have hundreds of pages?
I have tried using keychain expressions (to subtract 1 from it) but they don't seem to work with @page@ keys.
image