Bug 865650 - Ensure that looping will only happen if the start offset is less than the end offset; r=padenot

--HG--
extra : rebase_source : 3de31185083df174f7b6e823d1a135aee39c211d