Bug 874036 - Tab counter displays incorrectly in some circumstances, r=lucasr