GROOVY-4663: fix for using the local Preferences instance in groovyConsole unit test