Fix an issue in the OpenMP loop scheduling code.