Test case and fix for issue #433