Minor tweak to indexterms @sortas and @startofrange handling