Adds test case for issue #1097