Fix handling of empty <seg>s
Prevent windows from being way too tall