This is likely irrelevant but the sort order isn't exactly the same as before - lambda elt: elt[1], elt[0] is exactly same...

(But now that I look deeper I don't get the whole code. app_store is SortedDict, elt[1] seems to be insertion order. So, .keys() should be in the wanted order directly. But maybe better to just ignore this comment and wait for app-loading refactor to deal with this...)