Guard pages

Rebasing of #10460, I'll tack on commits as I find test failures.