Fix the INVARIANTS build
Only set the readonly bit on valid pages.

We check if this is zero later which it wil not be if this bit is set.