Revised loop AST