Use Twig's batch filter with conditional
I don't think you can test a conditional against a batch set like this. I think it's testing each batched set against the conditional instead of each item inside the batched sets which is what you're going for.

I would just create a new set of filtered matrix blocks and then batch the result.

{% set onlyHalfWidthBlocks = [] %}

{% for block in entry.curatedContentBlocks if block.type == 'halfWidthBlock' %}
  {% set onlyHalfWidthBlocks = onlyHalfWidthBlocks|merge([block]) %}
{% endfor %}

{% for row in onlyHalfWidthBlocks|batch(2) %}
  &lt;div class="wrapper"&gt;
    &lt;div class="row"&gt;
      {% for block in row %}
        {# ... block code here ... #}
      {% endfor %}
    &lt;/div&gt; &lt;!-- .row --&gt;
  &lt;/div&gt; &lt;!-- .wrapper --&gt;
{% endfor %}