........S. [ZBX-8092] optimized it so that we only search in config->hosts if really needed