GROOVY-6012: Source encoding is not used when scripts are reloaded

Any suggestion on how to add a system-independent unit test is welcome