get the attack value at the inconsistency, crossfade back between that value and the original signal.
see attached patch.
of course, the problem is you usually don't know where the inconsistency will arise. the only way around that is to delay the audio while your patch finds such a probem.