Fix #3251

Using ksort now, instead of prefilling the commonlanguages array.