GROOVY-6343: @CompileStatic: can't access static field from nested closures

added non regression test
GROOVY-6343: @CompileStatic: can't access static field from nested closures

removed superfluous line from test