Fix a shutdown deadlock in the selfcheck2 app when using rate
limiting.