Attempt #4 at fixing the dataraces. Fixed datarace in yagnats.

Signed-off-by: Stephan Hagemann <stephan@pivotallabs.com>