private static boolean isCorrectLocalVarOrParam(GroovyResolveResult last) {
    return !(last.getElement() instanceof PsiField) &&
           last.isAccessible() &&
           last.isStaticsOK() &&
           last.getCurrentFileResolveContext() == null;
  }
private static boolean isCorrectLocalVarOrParam(GroovyResolveResult last)