Fix infinite recursion when handling errors.
Fix infinite recursion when handling errors.

Fixes #3249.

cloudRoutine/Paket,thinkbeforecoding/Paket,fsprojects/Paket,vbfox/Paket,inosik/Paket,NatElkins/Paket,theimowski/Paket,fsprojects/Paket,thinkbeforecoding/Paket,NatElkins/Paket,0x53A/Paket,vbfox/Paket,vbfox/Paket,NatElkins/Paket,cloudRoutine/Paket,0x53A/Paket,baronfel/Paket,thinkbeforecoding/Paket,jam40jeff/Paket,vbfox/Paket,0x53A/Paket,sergey-tihon/Paket,cloudRoutine/Paket,NatElkins/Paket,cloudRoutine/Paket,thinkbeforecoding/Paket,theimowski/Paket,jam40jeff/Paket,inosik/Paket,0x53A/Paket,sergey-tihon/Paket,baronfel/Paket