anchor.diff:  
   function TTrie.GetBitFieldIndex(const Data; Level: Byte): Byte;
   begin
  -  if FTrieDepth = TrieDepth32Bits then
  -    Result := (Integer(Data) shr ChildIndexShiftArray32[Level]) and BucketMask
  -  else Result := (Int64(Data) shr ChildIndexShiftArray64[Level]) and BucketMask;
  +  case FTrieDepth of
  +    TrieDepth16Bits : Result := (Word(Data) shr ChildIndexShiftArray16[Level]) and BucketMask;
  +    TrieDepth32Bits : Result := (Integer(Data) shr ChildIndexShiftArray32[Level]) and BucketMask;
  +    else Result := (Int64(Data) shr ChildIndexShiftArray64[Level]) and BucketMask;
  +  end;
   end;
   
   function TTrie.GetChildIndex(ANode: PTrieBranchNode; BitFieldIndex: Byte
  
positive.code: implementation
  
  const
    ChildIndexShiftArray32 : array[0..TrieDepth32Bits - 1] of Byte =
      (28, 24, 20, 16, 12, 8, 4, 0);
    ChildIndexShiftArray64 : array[0..TrieDepth64Bits - 1] of Byte =
  
negative.code:     Result := False;
      exit;
    end;
    case FTrieDepth of
      TrieDepth16Bits :
      begin
        AIterator.LastResult16 := AIterator.LastResult16 shr BitsForChildIndexPerBucket;
        AIterator.LastResult16 := AIterator.LastResult16 and not Word(BucketMask);
      end;
      TrieDepth32Bits :
      begin
        AIterator.LastResult32 := AIterator.LastResult32 shr BitsForChildIndexPerBucket;
        AIterator.LastResult32 := AIterator.LastResult32 and not Integer(BucketMask);
      end;
      else
      begin
        AIterator.LastResult64 := AIterator.LastResult64 shr BitsForChildIndexPerBucket;
        AIterator.LastResult64 := AIterator.LastResult64 and not Int64(BucketMask);
      end;
    end;
    Result := True;
  end;
  