Missing Matrix row types on output after upgrade to Craft 3 (subsetting and cloning ElementQueries)
Turns out my issue is because I am running 2 loops through entry.timeline: 


A subset of the field with only subsection blocks to generate a table of contents
The entire field contents with a mixture of both subsection and item block types.


Craft 2 was totally OK with me defining a subset and then looping through the entire set, but with Craft 3, if the subset is defined first, it seems to persist when the second loop runs, even if the scope of the second loop is defined differently.

So my current solution is to have a template structured like this:

{# Fetch the entire set first even though it will run second #}
{% set timelineItems = entry.timeline.all() %}

{# Fetch the subset second even though it will run first #}
{% set tocItems = entry.timeline.type('subsection').all() %}

{% for item in tocItems %}
    {# do subsetted ToC stuff #}
{% endfor %}

{% for row in timelineItems %}
    {# do entire timeline stuff #}
{% endfor %}


See https://github.com/craftcms/cms/issues/2160 for more background, and cloning element queries in the docs.