TST: Add test for #1146.