Add test for issue #17946