Index: trunk/psModules/src/concepts/pmConceptsRead.c
===================================================================
--- trunk/psModules/src/concepts/pmConceptsRead.c	(revision 11404)
+++ trunk/psModules/src/concepts/pmConceptsRead.c	(revision 11749)
@@ -53,4 +53,5 @@
 static bool conceptParse(pmConceptSpec *spec, // The concept specification
                          psMetadataItem *concept, // The concept to parse
+                         pmConceptSource source, // The concept source
                          psMetadata *cameraFormat, // The camera format
                          psMetadata *target, // The target
@@ -71,5 +72,5 @@
     psMetadataItem *parsed = NULL;  // The parsed concept
     if (spec->parse) {
-        parsed = spec->parse(concept, spec->blank, cameraFormat, fpa, chip, cell);
+        parsed = spec->parse(concept, spec->blank, source, cameraFormat, fpa, chip, cell);
     } else {
         parsed = parsePlain(concept, spec->blank);
@@ -144,6 +145,7 @@
                 psString source = psMetadataLookupStr(&mdok, cell->config, nameSource); // The source
                 psFree(nameSource);
-                if (mdok && strlen(source) > 0 && strcasecmp(source, "VALUE") == 0) {
-                    if (!conceptParse(spec, conceptItem, cameraFormat, target, NULL, NULL, cell)) {
+                if (mdok && source && strlen(source) > 0 && strcasecmp(source, "VALUE") == 0) {
+                    if (!conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_CELLS,
+                                      cameraFormat, target, NULL, NULL, cell)) {
                         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from camera "
                                 "configuration\n", name);
@@ -158,5 +160,6 @@
             } else {
                 // Another type --- should be OK
-                if (!conceptParse(spec, conceptItem, cameraFormat, target, NULL, NULL, cell)) {
+                if (!conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_CELLS,
+                                  cameraFormat, target, NULL, NULL, cell)) {
                     psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from camera "
                             "configuration.\n", name);
@@ -241,5 +244,6 @@
             // Now we can parse this as we would ordinarily
         }
-        if (conceptItem && !conceptParse(spec, conceptItem, cameraFormat, target, fpa, chip, cell)) {
+        if (conceptItem && !conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_DEFAULTS,
+                                         cameraFormat, target, fpa, chip, cell)) {
             psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from DEFAULTS.\n", name);
             status = false;
@@ -340,5 +344,6 @@
         // This will also clean up the name
         if (headerItem) {
-            if (!conceptParse(spec, headerItem, cameraFormat, target, fpa, chip, cell)) {
+            if (!conceptParse(spec, headerItem, PM_CONCEPT_SOURCE_HEADER,
+                              cameraFormat, target, fpa, chip, cell)) {
                 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from header.\n", name);
                 status = false;
@@ -459,5 +464,6 @@
 
                     // Now we have the result
-                    if (!conceptParse(spec, conceptItem, cameraFormat, target, fpa, chip, cell)) {
+                    if (!conceptParse(spec, conceptItem, PM_CONCEPT_SOURCE_DATABASE,
+                                      cameraFormat, target, fpa, chip, cell)) {
                         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s from database.\n",
                                 name);
