Stop checks during shutdown.

Fixes #5784