Fix "out of memory" errors

Such errors happen when empty lines are passed to Model.label_sequence.
Model.label_sequence now returns empty string when "lines" argument is empty.