Unrolling the alternate loop branch and removing from the AST

The parser now wraps the loop in a !empty predicate if a
alternate branch is successfully parsed.