Add regression test for bug#615