layout: Refactor flow construction to move around large structs less.

5% perf win, and a net loss in lines of code.

r? @larsbergstrom