Index: Source/Python/Common/String.py
===================================================================
--- Source/Python/Common/String.py	(revision 17671)
+++ Source/Python/Common/String.py	(working copy)
@@ -1,7 +1,7 @@
 ## @file
 # This file is used to define common string related functions used in parsing process
 #
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
 # which accompanies this distribution.  The full text of the license may be found at
@@ -272,7 +272,8 @@
                 if SelfReplacement:
                     String = String.replace("$(%s)" % Macro, '')
                 continue
-            String = String.replace("$(%s)" % Macro, MacroDefinitions[Macro])
+            if "$(%s)" % Macro not in MacroDefinitions[Macro]:
+                String = String.replace("$(%s)" % Macro, MacroDefinitions[Macro])
         # in case there's macro not defined
         if String == LastString:
             break
Index: Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
===================================================================
--- Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py	(revision 17671)
+++ Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py	(working copy)
@@ -1286,6 +1286,9 @@
                                 File=self._FileWithError, ExtraData=' '.join(self._ValueList), 
                                 Line=self._LineIndex+1)
                 Result = Excpt.result
+            except BadExpression, Exc:
+                EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc), self._ValueList[1])
+                Result = False
 
         if self._ItemType in [MODEL_META_DATA_CONDITIONAL_STATEMENT_IF,
                               MODEL_META_DATA_CONDITIONAL_STATEMENT_IFDEF,
