Implement equals() using custom definition

The InventoryMerchant objects are sometimes created on-the-fly, so this is necessary here.