diff --git a/layouts/partials/_relearn/pageNext.gotmpl b/layouts/partials/_relearn/pageNext.gotmpl
index 05df71f41b..47a3b58fcd 100644
--- a/layouts/partials/_relearn/pageNext.gotmpl
+++ b/layouts/partials/_relearn/pageNext.gotmpl
@@ -7,7 +7,9 @@
 {{- else if eq .Page.Kind "taxonomy" }}
   {{- /* go to first term page */}}
   {{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
-  {{- $next = (index $pages 0).Page }}
+  {{- with index $pages 0 }}
+    {{- $next = .Page }}
+  {{- end }}
 {{- else }}
   {{- $next = partial "inline/next-page" . }}
 {{- end }}