Fix error when sorting on HybridModel.