Added test for issue #3316