Index: code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10404)
+++ code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10405)
@@ -225,6 +225,5 @@
     void Identifier::reset()
     {
-        if (this->factory_ != NULL) // TODO: should reset ALL identifiers, but currently the calls to inheritsFrom<>() are not reproducible
-            this->directParents_.clear();
+        this->directParents_.clear();
         this->parents_.clear();
         this->directChildren_.clear();
Index: code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10404)
+++ code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10405)
@@ -143,5 +143,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -151,4 +150,5 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10404)
+++ code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10405)
@@ -50,5 +50,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -58,4 +57,5 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10404)
+++ code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10405)
@@ -110,5 +110,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -118,4 +117,5 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
Index: code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10404)
+++ code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10405)
@@ -52,5 +52,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -60,4 +59,5 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
Index: code/branches/core7/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10404)
+++ code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10405)
@@ -32,5 +32,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -44,4 +43,5 @@
 
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
Index: code/branches/core7/test/core/class/SuperTest.cc
===================================================================
--- code/branches/core7/test/core/class/SuperTest.cc	(revision 10404)
+++ code/branches/core7/test/core/class/SuperTest.cc	(revision 10405)
@@ -73,5 +73,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -85,4 +84,5 @@
 
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
Index: code/branches/core7/test/core/command/CommandTest.cc
===================================================================
--- code/branches/core7/test/core/command/CommandTest.cc	(revision 10404)
+++ code/branches/core7/test/core/command/CommandTest.cc	(revision 10405)
@@ -141,5 +141,4 @@
                 {
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
@@ -149,4 +148,5 @@
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                 }
         };
