Normalize keys for index serialization.