anchor.diff:      // Expand polygon
       if not IsVisited(NearbyIdx) then
       begin
  -      MarkAsVisited( NearbyIdx, RefID,
  -                     fQueueArray[aIdx].Distance + KMDistanceWalk(fQueueArray[aIdx].DistPoint, gAIFields.NavMesh.Polygons[aIdx].NearbyPoints[K]),
  -                     gAIFields.NavMesh.Polygons[aIdx].NearbyPoints[K]);
  -      InsertAndSort(NearbyIdx);
  +      if aCanBeExpanded then
  +      begin
  +        MarkAsVisited( NearbyIdx, RefID,
  +                       fQueueArray[aIdx].Distance + KMDistanceWalk(fQueueArray[aIdx].DistPoint, gAIFields.NavMesh.Polygons[aIdx].NearbyPoints[K]),
  +                       gAIFields.NavMesh.Polygons[aIdx].NearbyPoints[K]);
  +        InsertAndSort(NearbyIdx);
  +      end;
       end
       // Merge clusters by changing reference (faster than copying arrays)
       else
  
positive.code:   // Start merging clusters
    Idx := fStartQueue;
    while RemoveFromQueue(Idx) do
      if CanBeExpanded(Idx) then
        ExpandPolygon(Idx);
  end;
  
  
  
negative.code: end;
  
  
  procedure TKMFindClusters.ExpandPolygon(aIdx: Word; aCanBeExpanded: Boolean);
  var
    K, L, NearbyIdx, RefID, NearbyRefID: Integer;
  begin
  