setItemInHand can add data too :D. The main thing is that the item in the hand is only set if the complete stack was dropped with Ctrl-Q, so the dropped stack is put in the empty slot of the hand.