Add regression test for #17186