This turns a hard crash in a recursive generator into a 'maximum recursion depth exceeded' exception.