Fixed an issue where WeightedHashSet was not counting the total weight
correctly.