........S. [ZBXNEXT-1128] fixed resolving of user macros; made minor code changes