Improve handling of sequences with just nils