Yes, on first page and on last page is checked.
It works fine when I use the TFRDBDataset, so I could copy the data from the array into a tmemorydataset and use that, but that's a lot of extra overhead just to get the page number on the last page.
The "almost" exact same code works on delphi in Fastreport, so it's probably a safe bet its a bug that existed in the original fast report code that lazreport is based from.