fix a very weird crash when std::set::empty returns false,
but std::set::begin returns the same as std::set::end