[OpenMP][FIX] Ensure thread states do not crash on the GPU

The nested parallelism causes thread states which still do not properly
work but at least don't crash anymore.

GitOrigin-RevId: d571af7f627491841fab7c456f774d7b8f546159
4 files changed