Moving loop_element to visitor.