Add regression test for #479