minor: only sort ref-toc trees and not normal tocs