Fix printing of empty-sequence.

Closes PR 12892.