Test case for issue #791.