Thanks for the report. This bug has already been fixed :)
If you’re curious, it occurred with any item you tried to place into an occupied slot, because the code got confused about whether it should sell or buy.
So feel free to dupe while you still can