Hit the ball twice

Hit the ball twice is a rarely seen form of dismissal. If a striker deliberately or, as the Laws put it wilfully, hits the ball twice he should be given out, on appeal. Yet a striker is entitled to hit the ball more than once with his bat or any part of his body except a hand not holding the bat. But he is only allowed to do this if attempting to protect his wicket - for example having hit the ball into the ground the first time, it may be spinning back along the pitch and threatening his stumps. He can even score runs from hitting the ball a second or subsequent time but only if any runs result from overthrows.
Even more confusingly, if a second or any subsequent hit prevents a possible catch from being taken, on appeal the striker should be given out - not for hitting the ball twice, but for Obstructing the field!