Make `hasStockpile()` work properly, rather than just working in the case of a good id being specified.