GROOVY-6391 Fix varname, also some style improvements

See https://jira.codehaus.org/browse/GROOVY-6391