[OMPT] Avoid SEGV when a worker thread needs its parallel id behind the barrier
When the code behind the barrier is executed, the master thread may have
already resumed execution. That's why we cannot safely assume that *pteam
is not yet freed.
This has been introduced by r258866.