private boolean isReferenceToLocal(@Nullable LighterASTNode operand, @NotNull LighterASTNode var) {
    // We do not actually resolve here as this method is guaranteed to be called within the scope of var,
    // thus simply comparing names is enough
    return operand != null &&
           operand.getTokenType() == REFERENCE_EXPRESSION &&
           Objects.requireNonNull(tree.getParent(operand)).getTokenType() != METHOD_CALL_EXPRESSION &&
           findExpressionChild(tree, operand) == null && // non-qualified
           Objects.equals(getNameIdentifierText(tree, operand), getNameIdentifierText(tree, var));
  }
private boolean isReferenceToLocal(@Nullable LighterASTNode operand, @NotNull LighterASTNode var)