Fix compatibility with old .spk-based and empty sorts