How to propely add views grouped filters with exposed filter in one of them I have a views with grouped filters like this

Group 1
field_1_condition
AND
field_2_condition (exposed)

OR

Group 2
field_3_condition
field_4_condition

I am expecting it to work like this:
Filtering is done based on the first group and input comes from user to the exposed  filter field. Then I want the query to check the second group and add all the matching things from there.

The initial query seems to be correct but as soon as I give input to exxposed filter the query is wrong. Views tries to combine similar fields for some reason

Initial query with those groups:

SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.language AS node_language, og_membership.gid AS og_membership_gid, node.created AS node_created, 'node' AS field_data_field_event_date_node_entity_type
FROM 
{node} node
LEFT JOIN {og_membership} og_membership ON node.nid = og_membership.etid AND og_membership.entity_type = 'node'
WHERE (( (node.type IN  ('birthday_event')) AND (og_membership.gid IS NULL ) AND (node.status = '1') )OR( (node.status = '1') AND (node.type IN  ('event')) ))
ORDER BY node_created DESC


The query when exposed filter gets input

SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.language AS node_language, og_membership.gid AS og_membership_gid, node.created AS node_created, 'node' AS field_data_field_event_date_node_entity_type
FROM 
{node} node
LEFT JOIN {og_membership} og_membership ON node.nid = og_membership.etid AND og_membership.entity_type = 'node'
WHERE (( (node.status = '1') AND (node.type IN  ('event', 'birthday_event')) AND (og_membership.gid = '1') ))
ORDER BY node_created DESC


This is the image of my views filter settings
I am still waiting for a response to do this more elegantly but since I am in a hurry I wrote a query alter to accomplish what I need. Maybe it's helpful to someone

function custom_views_query_alter(&amp;$view, &amp;$query) {
  if ($view-&gt;name == 'ts_group_events' &amp;&amp; $view-&gt;current_display == 'calendar') {
    if (empty($query-&gt;where[2]['conditions'])) {
      foreach ($query-&gt;where[1]['conditions'] as &amp;$condition) {
        if ($condition['field'] == 'node.type' &amp;&amp; $key = array_search('birthday_event', $condition['value'])) {
          unset($condition['value'][$key]);
        }
      }
      $query-&gt;where[2]['conditions'][] = array(
        'field' =&gt; 'node.status',
        'value' =&gt; 1,
        'operator' =&gt; '='
      );

      $query-&gt;where[2]['conditions'][] = array(
        'field' =&gt; 'node.type',
        'value' =&gt; array('birthday_event'),
        'operator' =&gt; 'in'
      );

      $query-&gt;where[2]['conditions'][] = array(
        'field' =&gt; 'og_membership.gid',
        'value' =&gt; NULL,
        'operator' =&gt; 'IS NULL'
      );
    }
  }
}