Add testcase for previous bugfix

I verified that this test fails without the bugfix.