minor refactor (test robustness on Windows)
GROOVY-5934: java.lang.OutOfMemoryError through Iterator.collectEntries and others
GROOVY-5941: Fix VerifyError if calling a protected method of the owner from a closure