layout: Fix borrow check issue
layout: Fix a potential safety issue relating to absolute containing
blocks.

It is possible for safe layout code to cause memory safety problems,
including use-after-free, because of the absolute containing block. This
commit fixes that issue. We have not seen this issue pop up yet, but I
wanted to kill it.