Fix crash in layout with 0 heights