Button visibility function help

I thought this was resolved, but I’m getting a strange error when I change my use case a bit…

  1. If I log in, visit the home page, click a job for which I am the owner, the Apply button is not visible on the Job Details page (good!)

  2. If I log in, click a job for which I am the owner from the My Account page, the Job Details page gives me an error (bad!)

In both cases the ‘job’ i’m clicking on is a link in a repeating panel.

The home page repeating panel is a different ItemTemplate than the My Account page repeating panel, but I believe the code is identical in both ItemTemplates, and they are both passing item=self.item to Job Details, so I’m confused.

ItemTemplate1 (Home Page - working):

ItemTemplate5 (My Account - generating error):

Can anyone tell me what I’m missing? Thank you! -Ian