Handle `as` template tag syntax also inside of a loop