Add test for fix to #1078