OK, but you might have missed the point. It’s a scope problem. The variable in the inner repeat is different scope than the one in the field, so they are not the same.
You may have to use namespace, or create a helper or another way to create a global in order to refer to that in the inner repeat loop.