private boolean shouldIgnore(PsiElement e, PsiExpression subExpression) {
    return e instanceof PsiInstanceOfExpression &&
           !ContainerUtil.exists(JavaPsiPatternUtil.getExposedPatternVariables(((PsiInstanceOfExpression)e)),
                                 var -> PatternResolveState.fromBoolean(mySubExpressionValue)
                                   .equals(PatternResolveState.stateAtParent(var, subExpression)) &&
                                        newTargetForPatternVariable(subExpression, var) == null);
  }
private boolean shouldIgnore(PsiElement e, PsiExpression subExpression)