This is a follow-up to #30185. Affected tests can be seen in commit 0ca02ce67720b7ff2b755fd19421b50e89df003d.