anchor.diff:  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;
  +    ThreadLocalStorageInstance:TFLREThreadLocalStorageInstance;
   begin
    result:=false;
  - ThreadLocalStorageCriticalSection.Enter;
  + ThreadLocalStorageInstanceCriticalSection.Enter;
    try
  -  ThreadLocalStorage:=FreeThreadLocalStorages;
  -  if assigned(ThreadLocalStorage) then begin
  -   FreeThreadLocalStorages:=ThreadLocalStorage.FreeNext;
  +  ThreadLocalStorageInstance:=FreeThreadLocalStorageInstances;
  +  if assigned(ThreadLocalStorageInstance) then begin
  +   FreeThreadLocalStorageInstances:=ThreadLocalStorageInstance.FreeNext;
     end else begin
  -   ThreadLocalStorage:=TFLREThreadLocalStorage.Create(self);
  -   ThreadLocalStorage.AllNext:=ThreadLocalStorages;
  -   ThreadLocalStorages:=ThreadLocalStorage;
  +   ThreadLocalStorageInstance:=TFLREThreadLocalStorageInstance.Create(self);
  +   ThreadLocalStorageInstance.AllNext:=ThreadLocalStorageInstances;
  +   ThreadLocalStorageInstances:=ThreadLocalStorageInstance;
     end;
    finally
  -  ThreadLocalStorageCriticalSection.Leave;
  +  ThreadLocalStorageInstanceCriticalSection.Leave;
    end;
    try
  -  ThreadLocalStorage.Input:=AInput;
  -  ThreadLocalStorage.InputLength:=AInputLength;
  +  ThreadLocalStorageInstance.Input:=AInput;
  +  ThreadLocalStorageInstance.InputLength:=AInputLength;
     repeat
  -   case ThreadLocalStorage.SearchMatchDFA(StartPosition,UntilExcludingPosition,MatchEnd,UnanchoredStart) of
  +   case ThreadLocalStorageInstance.SearchMatchDFA(StartPosition,UntilExcludingPosition,MatchEnd,UnanchoredStart) of
       DFAMatch:begin
        if UnanchoredStart then begin
         // For unanchored searchs, we must do also a "backward" DFA search
  -      case ThreadLocalStorage.SearchMatchReversedDFA(MatchEnd,StartPosition,MatchBegin) of
  +      case ThreadLocalStorageInstance.SearchMatchReversedDFA(MatchEnd,StartPosition,MatchBegin) of
          DFAMatch:begin
           if MatchBegin<StartPosition then begin
            MatchBegin:=StartPosition;
  
positive.code:       end;*)
       end;
      end;
      result:=ThreadLocalStorage.SearchMatchParallelNFA(Captures,StartPosition,UntilExcludingPosition,UnanchoredStart);
     end;
     break;
    until true;
   finally
    ThreadLocalStorageCriticalSection.Enter;
    try
     ThreadLocalStorage.FreeNext:=FreeThreadLocalStorages;
     FreeThreadLocalStorages:=ThreadLocalStorage;
    finally
     ThreadLocalStorageCriticalSection.Leave;
    end;
   end;
  end;
  
negative.code: 
  end;
  
  function TFLREThreadLocalStorageInstance.SearchMatchParallelNFA(var Captures:TFLRECaptures;const StartPosition,UntilExcludingPosition:longint;const UnanchoredStart:boolean):boolean;
  var LocalInputLength,CurrentPosition,Counter,ThreadIndex,CurrentLength,LastPosition:longint;
      CurrentThreadList,NewThreadList,TemporaryThreadList:PFLREThreadList;
      State,Matched,BestState:PFLREParallelNFAState;
  