Fix scrolling to the top on new messages

This introduces the possibility of reentrancy, which was guarded against
before.  It seems harmless, though.  Regardless, we'll keep our eyes
peeled for any issues related to it.

Closes: bgo #720712