Implement support of AND, OR and NOT symbols in multistate_groups.