Fix sporadic tmux crashing

See http://sourceforge.net/p/tmux/mailman/message/32010682/