Add regression test for issue #17216