The script recreateIssueStatistics.pl compares issues/old_issues to statistics to determine if there are any borrowernumber/itemnumber/date combinations present in the former that are not present in the latter. If it finds anything in (old_)issues that's not in statistics, it writes it into statistics to correct things. However, this goes awry really quickly if one is anonymizing reading history. In those cases, we expect to have a bunch of entries in old_issues tied to the anonymous borrower, but we never expect to find the anonymous borrower in the statistics table because we're maintaining the actual patron's borrowernumber there. recreateIssueStatistics.pl should have the option to *not* copy/recreate issues tied to the anonymous borrower.
But won't this lead to missing checkouts/checking if you use statistics table for statistics? It might be better as a switch/option on the script.