Added support for loop slices
Fixed bug preventing loops with same ids in different slices