layout: Don't crash on floated generated content.

It doesn't construct the float correctly, but at least it doesn't crash
anymore.

Fixes Reddit.

Closes #3287.

r? @metajack