Looks like that Hugo doesn’t like the delimit function in a single.html that makes use of if eq .Section to render different things according to category.
Anyway I managed to make the error go away by using delimit like this at the beginning of my template:
I just migrated a project that was deployed fine with Hugo 0.31 today to Hugo 0.36.1 and it failed.
I went through the release notes of every version since Hugo 0.32.
It seems that the taxonomies related fix in Hugo 0.33 made Hugo complain about not being able to iterate over nil using delimit, even though I had tags everywhere.
After some head scratching I wrapped the delimit function in a {{ if .IsPage }} condition and the error finally went away. The site is again functional like it used to be.