Also notable is that multiple iterations somehow see the same value for `$i` (as observed in the output listing above).
I've sumbitted a separate issue for that (RT #131871), because the Capture-lookup bug of the current issue occurs even when removing the `$i`.