Testcase and expected output for #3099

As requested; a testcase for the fix in pullrequest #3100.
Revert "Testcase and expected output for #3099"

This reverts commit 79b18241483d227f8c52b78a3ff3d96fa35459b7.