I’m not sure if the bug is that the undeploy icon above disappears but the item is undeployed anyway, or that clicking a second time the button shouldn’t cancel the task (to cancel the move command you have to right-click elsewhere, but since it’s a different command I’m not sure about the expected behavior).
I think it would actually cancel the action if it had time to notify the hearthlings about it. What happens is that when you click the second time, one hearthling was already on his way to grab the item.
So yeah, it would be better if the hearthlings understands that and cancel his action