.......PS. [ZBX-4054] added a comment on why we use var->val in some cases