Yet another attempt at trying to get terminfo to be selected properly.