[java] Incorrect lexical scope for try-with-resources statements

Problem to solve

The Java parser incorrectly creates an extra lexical scope for variables declared within a try-with-resources statement. Causing incorrect variable scoping.