extract out shared pet_expr_access_get_id