let find_lonely_key m =
    match m with
    | Top _ -> raise Not_found
    | Map m ->
        let elt = ref None in
        let rec check_one k v already_seen =
          if already_seen
          then raise Not_found
          else begin
            elt := Some (k,v); true
          end
        in
        ignore (M.fold check_one m false);
        match !elt with
        | None -> raise Not_found
        | Some v -> v