boolean (@NotNull GrControlFlowOwner owner, @NotNull PsiElement variable) { final PsiElement scope = owner.getParent() instanceof PsiMethod ? owner.getParent() : owner; return PsiTreeUtil.isAncestor(scope, variable, false); }