I have managed to isolate the problem to the table's CopyTable method. I'm sure it was happening during the export (prior to the copytable) at an earlier stage as well, but that part seems ok at present.
This example will produce the error. It works without error when the record limit is less than about 3000 records.