Fix race in Progress shutdown where some messages could have been lost.