Avoid building a temporary page for page layout
Since f511d98c merged unnecessarily separate loops, it is no longer needed to build a temporary page to run page layout only to draw a real page afterwards and set its configuration using that result.
All commits but the last one are from !1502 (merged).