Just had this issue. Swapped out a handbasket for a leather backpack and I couldn't put the discarded basket in my inventory. After shuffling inventory slots, it's because it still had items in it. I emptied out items in my main inventory and pulled baskets out of the storage slots while standing next to the discarded basket. I automatically picked up the other basket and its contents showed up in my main inventory. After a little shuffling, I was able to pick up the last basket once it was empty and it functioned like a normal inventory item again.