anchor.diff:   if assigned(State) and not Done then begin
     MatchCondition:=State^.MatchCondition;
     if (MatchCondition<>sfImpossible) and (((MatchCondition and sfEmptyAllFlags)=0) or Satisfy(MatchCondition)) then begin
  -   if ((MatchCondition and sfCapMask)<>0) and (TwoCountOfCaptures>0) then begin
  -    for Counter:=0 to TwoCountOfCaptures-1 do begin
  +   if ((MatchCondition and sfCapMask)<>0) and (CountSubMatches>0) then begin
  +    for Counter:=0 to CountSubMatches-1 do begin
        if (MatchCondition and ((1 shl sfCapShift) shl Counter))<>0 then begin   
         OnePassNFAWorkSubMatches[Counter]:=CurrentPosition;
        end;
       end;
      end;
  -   for Counter:=0 to TwoCountOfCaptures-1 do begin
  +   for Counter:=0 to CountSubMatches-1 do begin
       OnePassNFAMatchSubMatches[Counter]:=OnePassNFAWorkSubMatches[Counter];
      end;
      result:=true;
  
positive.code: 
  function TFLREThreadLocalStorageInstance.SearchMatchOnePassNFA(var Captures:TFLRECaptures;const StartPosition,UntilExcludingPosition:longint):boolean;
  var State,Nodes:PFLREOnePassNFAState;
      LocalInputLength,CurrentPosition,StateSize,TwoCountOfCaptures,Counter:longint;
      LocalByteMap:PFLREByteMap;
      Done:boolean;
      NextMatchCondition,MatchCondition,Condition,NextIndex:longword;
  
negative.code:   end;
  
    if (Condition and sfCapMask)<>0 then begin
     for Counter:=0 to CountSubMatches-1 do begin
      if (Condition and ((1 shl sfCapShift) shl Counter))<>0 then begin
       OnePassNFAWorkSubMatches[Counter]:=CurrentPosition;
      end;
  