Added testcase for (now working) ticket #4742.