Change key type to Slice for equals and hashCode.