private void removeEndVarAtOffset(int offset) {
    for (Iterator<VarOccurence> it = myVariableOccurrences.iterator(); it.hasNext();) {
      VarOccurence occurence = it.next();
      if (!isEndVariable(occurence.myName)) {
        continue;
      }
      if (occurence.myOffset == offset) {
        it.remove();
        myVariables.removeIf(variable -> occurence.myName.equals(variable.getName()));
      }
    }
  }
private void removeEndVarAtOffset(int offset)