Maintaing sort when switching dendrogram nodes.