Fix flaky index sampling test.