let only_active ab b =
    assert (is_active ab b);
    let none_other_active group =
      let other_not_active b'_name =
        b'_name = b.b_name ||
        (let b' = behavior_from_name ab b'_name in not (is_active ab b'))
      in
      List.for_all other_not_active group
    in
    try
      let complete =
        List.find (List.mem b.b_name) ab.funspec.spec_complete_behaviors
      in
      none_other_active complete
    with
        Not_found | No_such_behavior -> false