This fixes some errors calling the range closure with stack variables.
This works around a diffiency in the clang-19 ranges library.