Bug 1884553: Correctly handle modified array iterator state. r=mgaudet