Ported 'ConvertWhileToDoWhileLoopAction'