Add test for #1277