See for example https://integration.wikimedia.org/ci/job/integration-quibble-fullrun-sqlite/11/console
This happens deterministically. It seems that we don't run API tests in regular CI for MediaWiki core/extension/skin patches, so that's why it hasn't been noticed before.
00:05:22.844 00:05:22.844 1) Search 00:05:22.845 GET /search/page?q={term} 00:05:22.845 should ignore duplicate redirect source and target if both pages are a match: 00:05:22.845 AssertionError: expected { id: 22, …(6) } to have nested property 'matched_title' of null, but got 'Redirect source KzFubL4Jfq' 00:05:22.845 at Context.<anonymous> (tests/api-testing/REST/Search.js:115:11) 00:05:22.845 at runMicrotasks (<anonymous>) 00:05:22.845 at processTicksAndRejections (internal/process/task_queues.js:95:5) 00:05:22.845