The fix for
CRM-18155 breaks usage of old Membership Type / Status based smart groups breaks the case where the smart group came from an older release without Select2 in the advanced search interface.
This prevents mailings from working properly, and the selected values when editing the search criteria again all map to 1, meaning the search criteria would needs rebuilding from scratch in these cases.
Looks like the issue in
CRM-18155 may have been due to the conditions for CRM_Utils_Array::formatArrayKeys being too convoluted.
Proposed solution is to change the CRM_Utils_Array::formatArrayKeys to check that the resulting array_keys are exactly the same length as the original array.