Bugfix: segfault when OMP_NUM_THREADS == 1

Reported by Wout De Nolf