Tests: Add test for bad foreach inside a function
Add test for a case fixed by !1402 (merged) (commit 6a4a61d9). Prior to that fix, this test case could trigger an assertion failure.
Fixes: #17464 (closed)
Add test for a case fixed by !1402 (merged) (commit 6a4a61d9). Prior to that fix, this test case could trigger an assertion failure.
Fixes: #17464 (closed)