avoid dereferencing past-the-end iterator in simd algorithm test for compatibility with MSVC standard library debug mode