testcase for issue #2244