Improve VENDOR_PREFIX detection code