[1.7.x] Adjusted refactoring of vendor checks.

Thanks Shai for the thorough review.

Backport of fb90b7c from master