anchor.diff:  end;
   
   function TModules.GetModuleFromModuleHandle(ModuleHandle: THandle; RegisterNoExists: Boolean): TModule;
  -var
  -  I: Integer;
  +  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);
  -  for I := 0 to FModulesList.Count - 1 do
  -  begin
  -    Result := FModulesList[I];
  -    if Result.ModuleHandle = ModuleHandle then
  +
  +  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;
  -  end;
  -  if RegisterNoExists then
  -    Result := AddModule(ModuleHandle)
  -  else
  -    Result := nil;
  +    if RegisterNoExists then
  +      Result := AddModule(ModuleHandle)
  +    else
  +      Result := nil;
  +  finally
  +    TMonitor.Exit(GlobalLock);
  +  end;
   end;
   
   {$ENDREGION 'DebugInfo'}
  
positive.code:   ReportMemoryLeaksOnShutdown := True;
  {$ENDIF DEVMODE}
  GlobalLock := TObject.Create;
  
  finalization
  
  if Assigned(GlobalLock) then
    GlobalLock.Free;
  
  if Assigned(GlobalModules) then
    GlobalModules.Free;
  
  
negative.code: var
    LModule: TModule;
  begin
    NeedGlobalModules;
    try
      LModule := GlobalModules.ModuleFromAddress[Address];
      if Assigned(LModule) and Assigned(LModule.DebugInfo) then
      begin
        Result := LModule.DebugInfo.GetAddressInfo(Address, Info, Mask);
        Exit;
      end;
    except
      // Do nothing.
    end;
    Result := False;
  end;
  
  function GetSymbolAddress(ModuleHandle: THandle; const UnitName, SymbolName: string): Pointer;
  