That is the real problem.

`items_to_iterate` is a reference to item vector that `map::i_at` returned. A reference is not a pointer, it can not be reassigned. This line copies the content of `veh->parts[part].items` into `items_to_iterate` and overrides all the items that are already on the map.

It's the same as ` m.i_at(p_x,p_y) = veh->parts[part].items;`
I think that is responsible for your item duplication.

And as a player who collects *all* items out there, this PR is very appreciated.