Made layout mode explicit.

Accidentally putting expanding layouts inside layouts is a frequent
source of bugs.