Remove-one function doesn't work when a basket has only one item left

What I did: Have basket with fruit. Remove one until only one is left. Remove one more banana.

What I expected to happen: Obtain Banana. Obtain empty Basket

What actually happened: Nothing

IDs of related NPCs/items: - Not a full list, as this affects all fruit. Orange 5388 Banana 5408

2009-era source (if relevant):

Screenshots or video:

If the bug is exploitable make sure you tick the confidential checkbox below