Adds test case for issue #4301