Add test for GH#287