Add regression test for #278