Allow binds to work from within a single config

Add passed configuration into the system configuration
so that when we look for binds we can see our configuration.
Then just overwrite it when we're done.

Change-Id: I6cb981aeec9b6fbcb63363032c8ce8550bdc3f2a
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 37e68a2..e490420 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -1096,6 +1096,10 @@
                     PASSED_PROBES.push_back(name);
                     size_t foundDeviceIdx = 0;
 
+                    // insert into configuration temporarly to be able to
+                    // reference ourselves
+                    _systemConfiguration[name] = *record;
+
                     for (auto &foundDevice : foundDevices)
                     {
                         for (auto keyPair = record->begin();
@@ -1133,6 +1137,7 @@
                                     bool foundBind = false;
                                     std::string bind = keyPair.key().substr(
                                         sizeof("bind_") - 1);
+
                                     for (auto &configurationPair :
                                          _systemConfiguration.items())
                                     {
@@ -1183,6 +1188,7 @@
                             }
                         }
                     }
+                    // overwrite ourselves with cleaned up version
                     _systemConfiguration[name] = *record;
                 });
             p->run();