Fix readonly keys with bad indexes.