Ticket #5214: Added test case (ticket already fixed in mainline).

Hi,

The ticket is already fixed in mainline somehow, and this PR adds the associated cases to the test suite. Please consider merging.

Best regards,
  Simon