Added testcase for issue #872