Ticket #6187: Avoid infinite loop if eraseDeadCode does not remove anything

Hi,

This patch fixes the ticket, where we end up in an infinite loop upon invalid code (goto into the body of a dead loop): we continuously
 - Decrement the iterator
 - Call eraseDeadCode (that does nothing)
 - Increment the iterator

Thanks to consider merging.

Cheers,
  Simon