It appears that I fixed a race condition, but helgrind still complains. I'm realying on them being false positives.