`check_and_adjust_index` can raise an error before `NPY_END_THREADS`.