DataHandler fails to correctly re-sort (content) elements after moving one to top
Tested with v6.1.1, seems to affect 4.7.x too.
This occurs using drag&drop as well as calling the DataHandler itself.
While moving an element to top, its sorting will be set to 0 (the return value of getSortNumber called in line 3512), but the other elements' sorting is not updated. So if you move all elements to the top one after another, they all end up having sorting 0 and will be sorted by their uid instead.
Moving any one of those elements >down< will release the lock by reassigning valid sorting values to all affected content elements.