[PATCH] oleacc/tests: Fix crash when current thread is not in foreground state.