Added testcase for #495