Fixed check for whether used item has been 'used up' in robots for cases where the stack is replaced by the interact function. Fixes #583.