Fix inconsistent test failures.