tests: add regression test for bug #408