Resolve NPE in VariableScopeImpl.getLocalVariable()