[PATCH] config: improve config_get_id_from_config and config_get_hook_from_config