fix a bug in Range<T>::equal()