Bug 904602 - Optimize tree traversing in Range, r=mats

--HG--
extra : rebase_source : b223d822792e95c0b5bbd40046c32f1049b068d8