Fix nesting of each/repeat