Fixes issue #77: Bug in the layout mechanism