Customizing Casper Theme - Secondary Nav Issues

I’m using the default Casper theme as a base for a custom theme. I’m configuring the secondary nav with the conditional in the navigation.hbs file:

{{#if isSecondary}}
    <ul class="social-nav-list" role="menu">
        {{#foreach navigation}}
            <li class="nav-{{slug}}"><a href="{{url}}">{{slug}}</a></li>
        {{/foreach}}
    </ul>
{{else}}
    <ul class="nav" role="menu">
        {{#foreach navigation}}
            <li class="{{link_class for=(url) class=(concat "nav-" slug)}}" role="menuitem"><a href="{{url absolute="true"}}">{{label}}</a></li>
        {{/foreach}}
    </ul>
{{/if}}

This works as I want it to on every page except the main index. When scrolling down and activating the fixed nav bar (the outer site-nav-main div), the UL of the primary nav is treated as the secondary nav.

All other pages behave as expected and take the primary nav in the else block above. I can confirm by changing the class. All pages are using the same site-header, site-nav, and navigation partials.

Here’s the output from Chrome’s inspector. Top is index.hbs, bottom is author.hbs and all others.

Any ideas?

I discovered issue #11772 on Github, and upon further investigation, this is definitely the same problem. I’ve divined a fix, which I’ll post over there.