Test case for issue #6663