STS-3878 Fix: handling of GroovyRuntimeException and test.