add const to lookup_event_id() and lookup_value_id()