anchor.diff:    GlobalModules: TModules = nil;
   
     GlobalLock: TObject = nil;
  -
  +  RegxLock: TObject = nil;
     RegularExpressionsCompiled: Boolean = False;
   
     { Hint Regular expressions for TCustomTxtMapParser parser. }
  
positive.code: 
  procedure CompileRegularExpressions;
  begin
    TMonitor.Enter(GlobalLock);
    try
      HintSegmentRegEx := TRegEx.Create(HintSegmentRegExPattern, [roCompiled, roSingleLine, roIgnoreCase]);
      HintUnitRegEx := TRegEx.Create(HintUnitRegExPattern, [roCompiled, roSingleLine, roIgnoreCase]);
      HintPublicsByNameRegEx := TRegEx.Create(HintPublicsByNameRegExPattern, [roCompiled, roSingleLine, roIgnoreCase]);
      HintPublicsByValueRegEx := TRegEx.Create(HintPublicsByValueRegExPattern, [roCompiled, roSingleLine, roIgnoreCase]);
  
      SegmentRegEx := TRegEx.Create(SegmentRegExPattern, [roCompiled, roSingleLine]);
      UnitRegEx := TRegEx.Create(UnitRegExPattern, [roCompiled, roSingleLine]);
      SymbolRegEx := TRegEx.Create(SymbolRegExPattern, [roCompiled, roSingleLine]);
      LocationRegEx := TRegEx.Create(LocationRegExPattern, [roCompiled, roSingleLine]);
      LineRegEx := TRegEx.Create(LineRegExPattern, [roCompiled, roSingleLine]);
  
      RegularExpressionsCompiled := True;
    finally
      TMonitor.Exit(GlobalLock);
    end;
  end;
  
  procedure NeedGlobalModules; inline;
  begin
    if not Assigned(GlobalModules) then
      GlobalModules := TModules.Create;
  end;
  
  procedure NeedCompiledRegularExpressions; inline;
  begin
    if not RegularExpressionsCompiled then
      CompileRegularExpressions;
  end;
  
  {$ENDREGION 'GLOBAL'}
  
negative.code: end;
  
  function TModules.GetModuleFromModuleHandle(ModuleHandle: THandle; RegisterNoExists: Boolean): TModule;
    function GetModule: TModule;
    var
      I: Integer;
    begin
      for I := 0 to FModulesList.Count - 1 do
      begin
        Result := FModulesList[I];
        if Result.ModuleHandle = ModuleHandle then
          Exit;
      end;
      Result := nil;
    end;
  
  begin
    if ModuleHandle = 0 then
      Exit(nil);
  
    Result := GetModule;
    if Assigned(Result) then
      Exit;
  
    TMonitor.Enter(GlobalLock);
    try
      { Try again => Maybe another thread had already registered the current module. }
      Result := GetModule;
      if Assigned(Result) then
        Exit;
      if RegisterNoExists then
        Result := AddModule(ModuleHandle)
      else
        Result := nil;
    finally
      TMonitor.Exit(GlobalLock);
    end;
  end;
  
  {$ENDREGION 'DebugInfo'}
  