fix for GRAILS-10377 "Spock tests with Spy/Mock fail with forked execution enabled"