[[ Bug 11940 ]] Ensure the debug context is not permanently in a state o...

...f error