Add 0..10 and 0..2..10 syntax.
Avoid infinite loops by checking valid ranges.