Background:
Arrays of objects can be sorted with array::Sort in conjunction with SortAttribute to mark an attribute as key. The current algorithm seems to be unstable, i.e. order of elements with identical key values is not guaranteed to be preserved.
Suggestion:
Add alternative method or additional argument for requesting stable sorting.