Remove superfluous doLayouts. Fixes issue #278.