Additional tests for issue #4047