Fail when a non-vendor product references a vendor module.

Change-Id: Ia5ca233e9b11f64b72074f65899d3041cf955c4c
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 0398266..f10e224 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -566,6 +566,8 @@
     $(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
 ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \
     $(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+ALL_MODULES.$(LOCAL_MODULE).MAKEFILE := \
+    $(ALL_MODULES.$(LOCAL_MODULE).MAKEFILE) $(LOCAL_MODULE_MAKEFILE)
 ifdef LOCAL_MODULE_OWNER
 ALL_MODULES.$(LOCAL_MODULE).OWNER := \
     $(strip $(ALL_MODULES.$(LOCAL_MODULE).OWNER) $(LOCAL_MODULE_OWNER))
diff --git a/core/main.mk b/core/main.mk
index 6e5e8d6..78acde4 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -629,12 +629,12 @@
 # and get rid of it from this list.
 # TODO: The shell is chosen by magic.  Do we still need this?
 modules_to_install := $(sort \
-        $(ALL_DEFAULT_INSTALLED_MODULES) \
-        $(product_MODULES) \
-        $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
-        $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
-        $(CUSTOM_MODULES) \
-    )
+    $(ALL_DEFAULT_INSTALLED_MODULES) \
+    $(product_MODULES) \
+    $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
+    $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
+    $(CUSTOM_MODULES) \
+  )
 
 # Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
 # Filter out (do not install) any overridden packages.