Replaces a do-while loop with an equivalent while loop construct.