Fixed shared list sorting

Use Array.sort instead of underscore's sortBy() as they don't use the
same method/function signature.

Fixes #9462 

Please review @MorrisJobke @icewind1991