Add test for #1871