anchor.diff:        //We already have a position, finished with this group
         Positioned := fDefencePositions.FindPositionOf(Group) <> nil;
   
  -      if Positioned then Continue;
  -
  -      //Look for group that needs additional members, or a new position to defend
  +      if Positioned then
  +      begin
  +        //If this group doesn't have enough members
  +        if (Group.Count < fDefencePositions.TroopFormations[Group.GroupType].NumUnits) then
  +          if NeedsLinkingTo[Group.GroupType] = nil then
  +            NeedsLinkingTo[Group.GroupType] := Group; //Flag us as needing to be added to
  +
  +        Continue;
  +      end;
  +
  +      //Look for group that needs additional members
  +      GroupType := Group.GroupType; //Remember it because Group might get emptied
  +      if NeedsLinkingTo[GroupType] <> nil then
  +      begin
  +        fDefencePositions.RestockPositionWith(NeedsLinkingTo[GroupType], Group);
  +        if NeedsLinkingTo[GroupType].Count >= fDefencePositions.TroopFormations[GroupType].NumUnits then
  +          NeedsLinkingTo[GroupType] := nil; //Group is now full
  +
  +        Continue;
  +      end;
  +
  +      //Look for a new position to defend
         //In this case we choose the closest group, then move to a higher priority one later (see above)
         //This means at the start of the mission troops will take the position they are placed at rather than swapping around
         Positioned := fDefencePositions.FindPlaceForGroup(Group, AI_LINK_IDLE, AI_FILL_CLOSEST);
  
positive.code:   G: TGroupType;
    Positioned: Boolean;
    Group: TKMUnitGroup;
    NeedsLinkingTo: array [TGroupType] of TKMUnitGroup;
  begin
    for G := Low(TGroupType) to High(TGroupType) do
  
negative.code:         //If this group doesn't have enough members
          if (Group.Count < fDefencePositions.TroopFormations[Group.GroupType].NumUnits) then
            if NeedsLinkingTo[Group.GroupType] = nil then
              NeedsLinkingTo[Group.GroupType] := Group; //Flag us as needing to be added to
      end;
    end;
  end;
  