Chain select for country/state in Search Builder does not stay within OR groupings
#142 (closed) introduces a chained select for picking states from countries and picking counties from states. The changes there correctly limit the chaining to be within the same location type. However, picking a country will modify all state/province fields of that location type, even if they're in different "Also include contacts where" sections.
To recreate, let's say you are planning an event in Detroit:
Search for contacts in Michigan:
Contacts | Country | Home | = | United States Contacts | State | Home | = | Michigan
Search for contacts in Ontario by clicking "Also include contacts where" and setting up:
Contacts | Country | Home | = | Canada Contacts | State | Home | = | Ontario
Notice that the state dropdown where Michigan had been selected now has nothing selected and offers only Canadian provinces.
The same thing happens if you have a state field on its own (without country) and you pick a country in another