TESTS: added tests for FUNCTION capturing iteration words of REPEAT and FOREACH.