fix #6570: add comparator to treemap to provide the correct order in rank drop down