Precisely. As long as digging is made inconvenient slow enough, the player will always be able to prevent damage to his precious fort by being proactive against the besieging force.
Fix'd???
Well, no, I meant inconvenient - or more properly, costly. In other words, if digging is always going to be the very last thing besiegers try, then that gives the player ample time to forestall the attempt - no matter whether digging itself is fast or not.
As for Aquillon's remark that players should not be required to have a standing army in order to deal with invaders as a result of this - that's not really at issue here. An army sally is only one way you could deal with the problem of forestalling an undermining attempt. We should be engaged in thinking up more of them. This is suggestions, after all - when one suggestion seems to lead to detracting from player enjoyment, the proper response is to amend and supplement it, not to retract it - right?
Possibilities other than a standing army have already been mentioned: tricking the invaders to walk into a trap, diverting water into their holes, surrounding your fort with magma, allowing the construction of extra-hard walls.
There was also the objection that they could come at you from anywhere, but one could come up with remedies for this too without having to station guards everywhere. Make digging sounds evident and possible to pinpoint, for example (dwarfs maybe have extra acute hearing for this kind of thing). Also, it may be easier to just find the starting point of their tunnel and root them out that way. Medieval armies, I hear, used to dig parallel tunnels to the enemies' undermining tunnels and then break through and kill them.
The above will all be more practicable when/if the game requires tunnelers to dispose of the dirt and rock, as that makes the attempt even harder to conceal and the point of attack more easily guessed (since the labor increases with the square of the tunnel length, then).
The above details aside, basically I believe that tunneling enemies could be done right, but they would require some extra functionality in order to not be just intolerable (kind of like traps work now, but the other way around...). Especially being able to hear where there's tunneling going on.