This was triggered in our production environment, in a course site that has 1600+ users. The instructor attempted to export the results (XLS) to determine what students had attempted to take the quiz more than once. See attached stack trace.
When we analyzed the code, we determined that it was caused by an error with how the loop control is utilized in combination with accessing collection items based on a count from an un-synchronized 2nd collection.
The solution is to change the loop control and the collection.get() to be based off the actual collection intended to be accessed, rather than the collection which is not in sync and not being used within the loop.