Don't write to scratch until it's validated.

Followup to 81e2abc8001807d2f090e98cfad1c2661c5312b9 .