Add regression test for #1349