This is reproducible in Enketo 2.7.3 which was in Central v1.2.x. I believe this is a deviation from Collect that has always existed, unfortunately. I vaguely remember @Xiphware exploiting the Enketo behavior to use repeats as hidden loops to aggregate values or something like that. I think it's more expected that values which are not relevant are inaccessible for computation. I'd like to bring Enketo in line with Collect on this point but that would break forms like @Xiphware's. For now I'd recommend following @Mtyszler's recommendations if you're across the two clients.
If you really think it's a recent regression, we'd need help identifying a version of Enketo that does not use non-relevant values in calculations.