Ticket #5356: Added test case that works following the fix for #5506.

Hi,

This ticket is actually a dupe of #5506, that's now fixed. This PR is simply to add the associated test case.

Cheers,
  Simon