{% for stopusage in stopusages %}
    {% ifchanged stopusage.direction %}
        {% if not forloop.first %}</ul>{% endif %}
        <h2>
            {% if stopusage.direction == 'outbound' %}
                {% firstof service.outbound_description stopusage.direction.capitalize %}
            {% elif stopusage.direction == 'inbound' %}
                {% firstof service.inbound_description stopusage.direction.capitalize %}
            {% else %}{{ stopusage.direction.capitalize }}{% endif %}
        </h2>
        {% if has_minor_stops %}
            <input type="checkbox" id="show-all-stops-{{ forloop.counter }}" />
            <label for="show-all-stops-{{ forloop.counter }}">Show all stops</label>
        {% endif %}
        <ul class="route">
    {% endifchanged %}
    {% ifchanged stopusage.stop %}
        <li class="{{ stopusage.timing_status }}"><a href="{{ stopusage.stop.get_absolute_url }}">{{ stopusage.stop.get_qualified_name }}</a></li>
    {% endifchanged %}
    {% if forloop.last %}
        </ul>
    {% endif %}
{% endfor %}

{% for stopusage in stopusages %}
    {% ifchanged stopusage.direction %}
        {% if not forloop.first %}</ul>{% endif %}
        <h2>
            {% if stopusage.direction == 'outbound' %}
                {% firstof service.outbound_description stopusage.direction.capitalize %}
            {% elif stopusage.direction == 'inbound' %}
                {% firstof service.inbound_description stopusage.direction.capitalize %}
            {% else %}{{ stopusage.direction.capitalize }}{% endif %}
        </h2>
        {% if has_minor_stops %}
            <input type="checkbox" id="show-all-stops-{{ forloop.counter }}" />
            <label for="show-all-stops-{{ forloop.counter }}">Show all stops</label>
        {% endif %}
        <ul class="route">
    {% endifchanged %}
    {% ifchanged stopusage.stop %}
        <li class="{{ stopusage.timing_status }}" itemscope itemtype="https://schema.org/BusStop">
            <a href="{{ stopusage.stop.get_absolute_url }}">
                <span itemprop="name">{{ stopusage.stop.get_qualified_name }}</span>
                {% if stopusage.stop.latlong %}
                    <span itemprop="geo" itemscope itemtype="https://schema.org/GeoCoordinates">
                        <meta itemprop="latitude" content="{{ stopusage.stop.latlong.y }}" />
                        <meta itemprop="longitude" content="{{ stopusage.stop.latlong.x }}" />
                    </span>
                {% endif %}
            </a>
        </li>
    {% endifchanged %}
    {% if forloop.last %}
        </ul>
    {% endif %}
{% endfor %}

Fix test by reinstating BusStop microdata for now
Fix test by reinstating BusStop microdata for now
