use panicif() a bit;  only rewrite if hasn't been rewritten