Sometimes NaN exceptions in MuJoCo result in an infinite recursion loop which crashes the learning `RecursionError: maximum recursion depth exceeded while calling a Python object`