Switch from manual local formatting of notices (which lacks all the server-side goodness) to calling into the server-side with an AJAX variant of shownotice.
We were clearing the counter on the window title in the blur event, which gets fired *after* we switch away, thus triggering Firefox to mark the tab as updated again.
Clearing the counter on *focus* instead avoids this, and keeps the counter out of the way as well.