anchor.diff:  
   procedure TKMPointTagList.Delete(aIndex: Integer);
   begin
  -  if not InRange(aIndex, 0, Count-1) then Exit;
  +  if not InRange(aIndex, 0, Count - 1) or (Count = 0) then Exit;
   
     inherited Delete(aIndex);
   
  
positive.code:   public
      Tag, Tag2: array of Cardinal; //0..Count-1
      procedure Clear; override;
      procedure Add(const aLoc: TKMPoint; aTag: Cardinal; aTag2: Cardinal = 0); reintroduce;
      function IndexOf(const aLoc: TKMPoint; aTag: Cardinal; aTag2: Cardinal): Integer;
      procedure SortByTag;
      function Remove(const aLoc: TKMPoint): Integer; override;
      procedure Delete(aIndex: Integer); override;
  
negative.code: end;
  
  
  { TKMPointCounterList }
  procedure TKMPointCounterList.Add(const aLoc: TKMPoint; aTag2: Cardinal = 0);
  var
    Ind: Integer;
  begin
    Ind := IndexOf(aLoc);
    if Ind <> -1 then
      Tag[Ind] := Tag[Ind] + 1
    else
      inherited Add(aLoc, 1, aTag2);
  end;
  
  
  procedure TKMPointCounterList.AddNew(const aLoc: TKMPoint; aTag2: Cardinal = 0);
  begin
    if Contains(aLoc) then Exit;
  
    inherited Add(aLoc, 1, aTag2);
  end;
  
  
  function TKMPointCounterList.GetPointsCnt(aIndex: Integer): Word;
  begin
    Result := Tag[aIndex];
  end;
  
  
  function TKMPointCounterList.GetPointsCnt(const aLoc: TKMPoint): Word;
  var
    Ind: Integer;
  begin
    Ind := IndexOf(aLoc);
    if Ind = -1 then
      Result := 0
    else
      Result := Tag[Ind];
  end;
  
  
  