If you hold a stack of something you got reserved slots (in the inventory, not hotbar) for, and no more than fit into those slots, the first time you Q you get that error. The second keypress works and puts the stack back into the reserved slot in the inventory.