Fixed bug with inner loops

Innerloops were retrieving the parent loop as well which was preventing
save from working.