Fix maximum segment selection in spectrum_of_largest().