Fix GH-14775: range overflow on negative step. overflow occurs since we only deal with positive steps. close GH-14778