Fixed an error in missing modules

The aggregation disregarded the quantity of an item available,
pretending everything was a singleton.