Fixed #136    Also, factored out TreeSet creation and made SectionMap preserve insertion order.