Printf "%s%s" string concatenation suddenly doesn't work

I have the following partial:

<div class="tab-bar">
  <nav class="tab-bar-nav" role="navigation">

      {{ $mycurrentPage := . }}
      <li class="{{if .IsHome }}active{{end}}">
        <a href="/">
          <span class="menu-icon">{{ partial "icons/icon-home.html" . }}</span>
      {{ range .Site.Menus.main }}
      {{ $icon := .Pre }}
      {{ $path := (printf "%s%s" "icons/" $icon) }}
      <li class="{{if or ($mycurrentPage.IsMenuCurrent "main" .) ($mycurrentPage.HasMenuCurrent "main" .) }}active{{end}}">
        <a href="{{.URL}}">
          <span class="menu-icon">{{ partial $path . }}</span>
          <span>{{ .Name }}</span>
      {{ end }}

This rendered fine earlier today. I haven’t changed anything. Now I get:

ERROR 2018/08/26 21:38:43 Error while rendering "section" in "about/": template: _default/list.html:27:36: executing "mobile-nav" at <partial "site/mobile...>: error calling partial: template: partials/site/mobile-nav.html:17:37: executing "p
artials/site/mobile-nav.html" at <partial $path .>: error calling partial: Partial "icons/" not found

If I put a space in there: "%s %s" I get something closer to a path (but with a space, as expected):

... at <partial $path .>: error calling partial: Partial "icons/ icon-blog.html" not found

I don’t understand how printf could stop evaluating a string concatenation when it worked earlier. I’ve restarted computer/server etc. to troubleshoot.

It seems to have something to do with the / where it stops evaluating the printf command after it encounters a slash.

If I do:

{{ $icon := .Pre }}
      {{ $path := (printf "%s%s%s" "icons" "/" $icon ) }}

{{ partial $path . }}

I get the same error:

... at <partial $path .>: error calling partial: Partial "icons/" not found

Either killing the /public directory or upgrading Hugo via homebrew fixed the issue (did both).