DEV: Fix some more flaky tests (PR #9384)

GitHub