Add testcase for issue 1780