fixes an issue when the generation of an artificial exception fails because the exception type has not been resolved yet