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

Fixed properly #3