anchor.diff:         function SubMatchesUpdate(const SubMatches:PFLRESubMatches;const Index,Position:longint):PFLRESubMatches; {$ifdef caninline}inline;{$endif}
   
          function NewThread(const Instruction:PFLREInstruction;const SubMatches:PFLRESubMatches):TFLREThread; {$ifdef caninline}inline;{$endif}
  -       procedure AddThread(const ThreadLocalState:TFLREThreadLocalState;const ThreadList:PFLREThreadList;Instruction:PFLREInstruction;SubMatches:PFLRESubMatches;const Position:longint);
  +       procedure AddThread(const ThreadList:PFLREThreadList;Instruction:PFLREInstruction;SubMatches:PFLRESubMatches;const Position:longint);
   
          function DFACacheState(const State:PFLREDFAState):PFLREDFAState; {$ifdef caninline}inline;{$endif}
          procedure DFAAddInstructionThread(const State:PFLREDFAState;Instruction:PFLREInstruction);
  
positive.code:    break;
    end;
    CurrentChar:=Input[CurrentPosition];
    inc(ThreadLocalState.Generation);
    for ThreadIndex:=0 to CurrentThreadList^.Count-1 do begin
     CurrentThread:=@CurrentThreadList^.Threads[ThreadIndex];
     Instruction:=CurrentThread^.Instruction;
  
negative.code: function TFLRE.SearchMatch(const AInput:pointer;const AInputLength:longint;var Captures:TFLRECaptures;StartPosition,UntilExcludingPosition:longint;UnanchoredStart:boolean):boolean;
  var MatchBegin,MatchEnd:longint;
      HaveResult:boolean;
      ThreadLocalStorage:TFLREThreadLocalStorage;
  begin
   result:=false;
   ThreadLocalStorageCriticalSection.Enter;
   try
    ThreadLocalStorage:=FreeThreadLocalStorages;
    if assigned(ThreadLocalStorage) then begin
     FreeThreadLocalStorages:=ThreadLocalStorage.FreeNext;
    end else begin
     ThreadLocalStorage:=TFLREThreadLocalStorage.Create(self);
     ThreadLocalStorage.AllNext:=ThreadLocalStorages;
     ThreadLocalStorages:=ThreadLocalStorage;
    end;
   finally
    ThreadLocalStorageCriticalSection.Leave;
   end;
   try
    ThreadLocalStorage.Input:=AInput;
    ThreadLocalStorage.InputLength:=AInputLength;
    repeat
     case SearchMatchDFA(ThreadLocalStorage,StartPosition,UntilExcludingPosition,MatchEnd,UnanchoredStart) of
      DFAMatch:begin
       if UnanchoredStart then begin
        // For unanchored searchs, we must do also a "backward" DFA search
        case SearchMatchReversedDFA(ThreadLocalStorage,MatchEnd,StartPosition,MatchBegin) of
         DFAMatch:begin
          if MatchBegin<StartPosition then begin
           MatchBegin:=StartPosition;
  