157
159
node_refs, _ = self._check_key_ref_value(key, references, value)
159
161
raise errors.BadIndexDuplicateKey(key, self)
162
164
if self._nodes_by_key is not None and self._key_length > 1:
163
165
self._update_nodes_by_key(key, value, node_refs)