Fix insomnia-induced test failures.