Factored out layout bounds, see #112