Purity for flat cohomology