anchor.diff:      inc(FStats.TotalMemAllocated, sizeof(TKeyValuePairNode));
     end;
   begin
  -  if (FDuplicatesMode = dmReplaceExisting) and AttemptReplaceObject(kvp.Key, kvp.KeySize, kvp.Value) then
  -  begin
  -    Result := False;
  -    exit;
  -  end;
     CalcHash(Hash, kvp.Key, kvp.KeySize);
     inherited Add(Hash, PTrieLeafNode(Node), WasNodeBusy);
     if not WasNodeBusy then
  
positive.code:     FDuplicatesMode: TDuplicatesMode;
      FAutoFreeValue : Boolean;
      FAutoFreeValueMode : TAutoFreeMode;
      function AttemptReplaceObject(Key: Pointer; KeySize: Cardinal; Value: Pointer): Boolean;
    protected
      function LeafSize : Cardinal; override;
      procedure InitLeaf(var Leaf); override;
  
negative.code:   kvpNode : PKeyValuePairNode;
    WasNodeBusy : Boolean;
    ChildIndex : Byte;
    function CheckForDuplicatesOrReplaceNode : Boolean;
    begin
      kvpNode := PHashTrieNodeArray(Node^.Children)^[ChildIndex];
      while kvpNode <> nil do
      begin
        if CompareKeys(kvpNode^.KVP.Key, kvpNode^.KVP.KeySize, kvp.Key, kvp.KeySize) then
        begin
          dec(FCount); // Rollback prior addition of FCount
          if FDuplicatesMode = dmNotAllow then
            RaiseDuplicateKeysNotAllowed
          else
          begin
            if AutoFreeValue and (kvpNode^.KVP.Value <> nil) and (kvpNode^.KVP.Value <> kvp.Value) then
              FreeValue(kvpNode^.KVP.Value);
            kvpNode^.KVP.Value := kvp.Value;
            Result := True;
            exit;
          end;
        end;
        kvpNode := kvpNode^.Next;
      end;
      Result := False;
    end;
    procedure AllocNewKVPAndAddToList;
    begin
  