Output of matrix field twice in one template
Here's how I would approach this...
{% set classBlocks = entry.classBlocks.all() %}

{% if classBlocks | length %}
    {% set instructors = classBlocks | filter(block =&gt; block.type == 'instructors') %}
    by &lt;strong&gt;{{ instructors | map(instructor =&gt; instructor.fullName) | join(', ', ', and ') }}&lt;/strong&gt;
{% endif %}

We're using several filters here to achieve what I think you're trying to achieve:

| filter is used to filter just the instructor blocks out of all your class blocks; this saves us from having to do the cloning and extra query mess and is more performant.
| map is used to take our array of instructor blocks and return an array containing just their names.
| join is used to take the array of names and create a nice readable list (I find it cleaner than doing the loop checking like you're doing) - e.g. &quot;Bob, Matt, and Susy&quot;

Let me know in the comments if you have any questions or if I'm not understanding the question correctly!