Add regression test for #239