Maybe somewhere in the code it says

    key_string = to_string(*key);
instead of

    key_string = to_string(key);