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

added non regression test