Testcase for #322