Fix deadlock when rescheduling checks.

Fixes #5092
Fix initial check schedule.

Fixes #5240