Introduce a range version of std::any_of, and use it in SCEV