Consider spacing on smart layout. Improves #1303 Fixes #718