adapted the array-set compiler to use the new foreach opcodes