Fix corruption when reopening database, caused by aggressive page recycling.