anchor.diff:   if result then begin
     SetLength(Captures,Instance.CountCaptures);
     for Counter:=0 to Instance.CountCaptures-1 do begin
  -   Captures[Counter].Start:=OnePassNFAMatchCaptures[Counter*2];
  -   Captures[Counter].Length:=OnePassNFAMatchCaptures[(Counter*2)+1]-OnePassNFAMatchCaptures[Counter*2];
  +   Captures[Counter].Start:=OnePassNFAMatchSubMatches[Counter*2];
  +   Captures[Counter].Length:=OnePassNFAMatchSubMatches[(Counter*2)+1]-OnePassNFAMatchSubMatches[Counter*2];
     end;
    end;
   
  
positive.code:        if LastPosition<Position then begin
          LastPosition:=Position;
          for i:=0 to Instance.CountSubMatches-1 do begin
           BitStateNFAMatchCaptures[i]:=BitStateNFAWorkCaptures[i];
          end;
         end;
        end else begin
         for i:=0 to Instance.CountSubMatches-1 do begin
          BitStateNFAMatchCaptures[i]:=BitStateNFAWorkCaptures[i];
         end;
         exit;
        end;
  
negative.code:  if TrySearch(StartInstruction,Position) then begin
    SetLength(Captures,Instance.CountCaptures);
    for Counter:=0 to Instance.CountCaptures-1 do begin
     Captures[Counter].Start:=BitStateNFAMatchSubMatches[Counter*2];
     Captures[Counter].Length:=BitStateNFAMatchSubMatches[(Counter*2)+1]-BitStateNFAMatchSubMatches[Counter*2];
    end;
    result:=BitStateNFAMatch;
   end else begin
  