Fixed #1103: Don't use for/in to iterate an array.

Closed #1104.