Extensive and thoughtful modifications to vendor_module_check

Change-Id: Ifa25c0d9bb04de5d82ca33d5d94b78adeaed42c7