Fix recursive application of dead loop elimination