I was not available when #8068 was merged, sorry for late fix.
This limits the scope of local variable, unifies for cycles used and as a side effect/bonus, fixes three instances of -Wshadow warnings ;-)
For the reference, fixed warning is:
./blockencodings.h:56:25: warning: declaration shadows a local variable [-Wshadow]
for (size_t i = 0; i < indexes.size(); i++) {
^
./blockencodings.h:43:20: note: previous declaration is here
size_t i = 0;
^
For more details, see #8105.