Fix AIM crash

Fixes #10246 - the item has been removed from the inventory (`reduce_stack`), but adding it to the cargo part fails, so the item is added back to the inventory, but it's now at a different place, so the references in the items vector are wrong.