Properly handle merge stacks in equipment inventory

Fixes #1137
Merge pull request #1138 from dorkster/fixes

Properly handle merge stacks in equipment inventory