Use a different variable so we don't step over the one used in the outer loop
Index val on 'id' not on 0