added support for nested `for-each` loops.