Fix race conditions relating to failure count
Merge pull request #1 from willglynn/failure_races

Fix race conditions relating to failure count