Site Categories issue with sorting them

Site categories are not being sorted, initially reported here:
https://premium.wpmudev.org/forums/topic/js-error-on-pro-sites-checkout