Fix another bug in the terminfo selection.