Added regression test for #21497