Issue #3556987 by phenaproxima, penyaskito, fathershawn: Add a recursive sort-by-key function to SortArray
mentioned in commit 13d4f6c1