New approach: limit allowed range lengths to typemax(Int).