Fix #3241.

The issue was solely in the tests: a stray `forEach`.
Merge pull request #3248 from hjdivad/fix-3241

Fix #3241.