Predictable index sorting