Fixes an issue where a worker may quit with waiting tasks after one of the tasks throws an exception and no default exception handler is set