anchor.diff:        Untouched := SumOfNotType(WidthType, ColumnSpecs, MinWidths, StartIndex, EndIndex);
         IncreaseWidthsEvenly(WidthType, MaxWidths, StartIndex, EndIndex, CellMax - Untouched, SpannedMax - Untouched, SpannedCounts[WidthType]);
       end;
  +
  +    // Prevent MinWidths from getting larger than MaxWidths, otherwise the calculation goes crazy
  +    for I := StartIndex to EndIndex do
  +      if MinWidths[I] > MaxWidths[I] then
  +        MaxWidths[I] := MinWidths[I];
     end;
   
     procedure IncreaseMinMaxWidthsByMinMaxDelta(WidthType: TWidthType; StartIndex, EndIndex: Integer);
     var
       Deltas: IntArray;
  +    I: Integer;
     begin
       Deltas := SubArray(MaxWidths, MinWidths);
       if CellMin > SpannedMin then
         IncreaseWidthsByMinMaxDelta(WidthType, MinWidths, StartIndex, EndIndex, CellMin - SpannedMin, SpannedMax - SpannedMin, SpannedCounts[WidthType], Deltas);
       if CellMax > SpannedMax then
         IncreaseWidthsByMinMaxDelta(WidthType, MaxWidths, StartIndex, EndIndex, CellMax - SpannedMax, SpannedMax - SpannedMin, SpannedCounts[WidthType], Deltas);
  +
  +    // Prevent MinWidths from getting larger than MaxWidths, otherwise the calculation goes crazy
  +    for I := StartIndex to EndIndex do
  +      if MinWidths[I] > MaxWidths[I] then
  +        MaxWidths[I] := MinWidths[I];
     end;
   
   var
  
positive.code:       end
        else
        begin
          // add the remaining pixels to the first column's width.
          Inc(Widths[I], Excess - AddedExcess);
          break;
  
negative.code: // Increases width of spanned columns relative to difference between min and max widths.
  var
    AddedExcess, AddedDelta, I, Add: Integer;
    WidthSum, K, Remaining: Integer;
  begin
    AddedExcess := 0;
    AddedDelta := 0;
  