Fix brittle (and false-positive-prone) test

The intent of this test is to assert that an error was thrown by
LayoutManager. The error message itself (while important) is not a
relevant concern for a unit test--asserting it here only makes the
library more difficult to maintain.

Additionally, move the assertion outside of the control flow statement
to avoid potential false positives.