Fix #3251

Using ksort now, instead of prefilling the commonlanguages array.
final fix for xsendfile zip generation race condition