Hmm, only issue I could find was that if the trash inventory itself couldn't fit the items that were being moved, then those items would indeed be deleted. Honestly that's a pretty bizarre situation but I'm going to fix that.
There shouldn't be any issues with quality as I've done a playthrough without any issues and can't find one in the code's logic either.
Different inventory sizes should be fine as well because I use the game's own insert and remove methods.
Well, let's just hope the issue was that trash inventory thing
Thanks for reporting :)