Don't crash when logging to tty.
Merge bug26472