This does not check whether the stride is negative, though.