Fix Twine corruption problem with diagnostics.

This fixes the autobuilders I broke with a recent patch. Thanks echristo
and dblaikie for beating me with a clue stick.