Add test case from #345