Restores use of forEach iterating on non-array values. Fixes #345

Speed optimization, but only works on tables.