Adding testcase for #1037