Test case for issue #333