Only prune taps if taps exist.

Closes #19192.