Test case for #1275
Fix #1275