Add a regression ref test.
See also #19680.