Index: branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 904)
+++ branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 908)
@@ -588,5 +588,9 @@
 {
 #if R0042_PROFILE_INDICATION
+#if FIX_LAYER_ID_INIT
+  Bool bMultiLayerExtSpsFlag = (pcSPS->getLayerId() != 0 && pcSPS->getNumDirectRefLayers() != 0);
+#else
   Bool bMultiLayerExtSpsFlag = (pcSPS->getNumDirectRefLayers() != 0 ) ; 
+#endif
 #endif
 #if ENC_DEC_TRACE  
@@ -1003,7 +1007,9 @@
     }
   }
+#if !FIX_LAYER_ID_INIT  // It was still called because NECESSARY_FLAG does not exist and is by default "false"
 #if !NECESSARY_FLAG   // Already called once in TAppEncTop.cpp
 #if DERIVE_LAYER_ID_LIST_VARIABLES
   pcVPS->deriveLayerIdListVariables();
+#endif
 #endif
 #endif
