#612 for 4.0.x: Attributes other than String and element iterable in foreach not supported