Add test case for issue 7049.

This is the test case for a worksforme bug, to make sure we don't get a regression in the future.