The sort order is wrong when switching from heavy to tree view.
Created attachment 22869 [details] Proposed patch
Created attachment 22871 [details] Proposed patch
Landed in r35838.