Fix race condition on info.thread_id in OpenMP scheduler (#399)