Mmm. Don't think this is really a bug. (As it seems a very deliberate safety fall-back feature)
Some what unexpected, sure.
Basic reason.
Cloth switching will be done on the items you are wearing in the a
LIFO order. (no special look for "inventory changing" items first.)
If the cloth switch can't be completed. (blocked by a original in inventory item, while trying to take of a inventory size changing item.)
The Switch process will be stopped and the already taken-off gear will be places back: 1) in characters inventory, 2) in characters hand, 3) on the ground.