Fix preservation of page dirty class across page changes