Fix Helgrind failure

Helgrind gets confused when mutexes are stack-allocated.
GCC 4.8 with -O0 got unlucky in its generated code, as false
negatives were reported.