Fixed a crash when changing an array while being enumerated