_lookup_extended takes a pointer to the key-pointer since it has to set the old
key pointer value. _insert just takes the key-pointer, not a pointer to it.
Passing a pointer-to-a-pointer causes the outer pointer to be dereferenced as a
struct (when it in fact points to a pointer to struct) and leads to incorrect
behaviour and uninitialized/out-of-bounds memory accesses.