Stacking fixes

Addresses the issues raised in #594. Doesn't fix any design issues, but does at least mean that ammo and meds restack properly.