This fixes some errors calling the range closure with stack variables.
This works around a diffiency in the clang-19 ranges library.
Taken from the illustrative text at https://en.cppreference.com/w/cpp/ranges/chunk_view