Do not use `for...in` to iterate an array.

Fixes #1103