The regression test is originally from #64324 but was removed again after the fix in there turned out to break other things.