At some point we must have written some custom code to set the session variable:
It looks like that code is missing. The files you attached refer to that session variable, but don't have the code where it is set. I'm not sure if you can find that code, or it might have to be re-written if you have lost it entirely. If it is lost, we would need a premier support ticket to re-create it during a screen sharing session.