Ticket #5743: Added test case that was fixed along with #5605.

Hi,

This patch simply adds the (reduced) test case from this ticket, that's fixed now that #5605 is. Please consider merging.

Cheers,
  Simon