show variable doesn't work in header (writer)

I want to use the Last name of the subject of my report in the header, but when I try to show the variable (set in the body of the report) it is blank. The variable shows everywhere else inside the body of the report, but not the header. I even tried copy and pasting the shown variable from inside the body to the header and it is still blank.

I see that this was a problem experienced back in 2013 and has since been “fixed” but I’m still having the problem. I’m using a mac and a very recent version.

Header knows about the variable value as set in the previous pages, or in the very beginning of this page (the first paragraph). So if a variable was defined later on this page, it will not be shown in the header. But will in the footer.