Index: code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10371)
+++ code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10372)
@@ -135,5 +135,5 @@
     {
         if (this->parents_.empty())
-            this->directParents_.insert(directParent);
+            this->directParents_.push_back(directParent);
         else
             orxout(internal_error) << "Trying to add " << directParent->getName() << " as a direct parent of " << this->getName() << " after the latter was already initialized" << endl;
@@ -146,5 +146,5 @@
      * @param initializationTrace All identifiers that were recorded while creating an instance of this class (including nested classes and this identifier itself)
      */
-    void Identifier::initializeParents(const std::set<const Identifier*>& initializationTrace)
+    void Identifier::initializeParents(const std::list<const Identifier*>& initializationTrace)
     {
         if (!IdentifierManager::getInstance().isCreatingHierarchy())
@@ -156,7 +156,7 @@
         if (this->directParents_.empty())
         {
-            for (std::set<const Identifier*>::const_iterator it = initializationTrace.begin(); it != initializationTrace.end(); ++it)
+            for (std::list<const Identifier*>::const_iterator it = initializationTrace.begin(); it != initializationTrace.end(); ++it)
                 if (*it != this)
-                    this->parents_.insert(*it);
+                    this->parents_.push_back(*it);
         }
         else
@@ -183,12 +183,12 @@
 
             // initialize all parents
-            for (std::set<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
+            for (std::list<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
                 const_cast<Identifier*>(*it)->finishInitialization(); // initialize parent
 
             // parents of parents are no direct parents of this identifier
             this->directParents_ = this->parents_;
-            for (std::set<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
-                for (std::set<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
-                    this->directParents_.erase(*it_parent_parent);
+            for (std::list<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
+                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
+                    this->directParents_.remove(*it_parent_parent);
         }
         else if (!this->directParents_.empty())
@@ -197,13 +197,13 @@
 
             // initialize all direct parents
-            for (std::set<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
+            for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
                 const_cast<Identifier*>(*it)->finishInitialization(); // initialize parent
 
             // direct parents and their parents are also parents of this identifier (but only add them once)
             this->parents_ = this->directParents_;
-            for (std::set<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
-                for (std::set<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
+            for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
+                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
                     if (std::find(this->parents_.begin(), this->parents_.end(), *it_parent_parent) == this->parents_.end())
-                        this->parents_.insert(*it_parent_parent);
+                        this->parents_.push_back(*it_parent_parent);
         }
         else if (!this->isExactlyA(Class(Identifiable)))
@@ -216,9 +216,9 @@
 
         // tell all parents that this identifier is a child
-        for (std::set<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
+        for (std::list<const Identifier*>::const_iterator it = this->parents_.begin(); it != this->parents_.end(); ++it)
             const_cast<Identifier*>(*it)->children_.insert(this);
 
         // tell all direct parents that this identifier is a direct child
-        for (std::set<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
+        for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
         {
             const_cast<Identifier*>(*it)->directChildren_.insert(this);
@@ -255,5 +255,5 @@
     bool Identifier::isChildOf(const Identifier* identifier) const
     {
-        return (this->parents_.find(identifier) != this->parents_.end());
+        return (std::find(this->parents_.begin(), this->parents_.end(),  identifier) != this->parents_.end());
     }
 
@@ -264,5 +264,5 @@
     bool Identifier::isDirectChildOf(const Identifier* identifier) const
     {
-        return (this->directParents_.find(identifier) != this->directParents_.end());
+        return (std::find(this->directParents_.begin(), this->directParents_.end(), identifier) != this->directParents_.end());
     }
 
Index: code/branches/core7/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10371)
+++ code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10372)
@@ -148,5 +148,5 @@
             Identifier& inheritsFrom(Identifier* directParent);
 
-            void initializeParents(const std::set<const Identifier*>& initializationTrace);
+            void initializeParents(const std::list<const Identifier*>& initializationTrace);
             void finishInitialization();
 
@@ -159,9 +159,9 @@
 
             /// Returns the parents of the class the Identifier belongs to.
-            inline const std::set<const Identifier*>& getParents() const { return this->parents_; }
+            inline const std::list<const Identifier*>& getParents() const { return this->parents_; }
             /// Returns the children of the class the Identifier belongs to.
             inline const std::set<const Identifier*>& getChildren() const { return this->children_; }
             /// Returns the direct parents of the class the Identifier belongs to.
-            inline const std::set<const Identifier*>& getDirectParents() const { return this->directParents_; }
+            inline const std::list<const Identifier*>& getDirectParents() const { return this->directParents_; }
             /// Returns the direct children the class the Identifier belongs to.
             inline const std::set<const Identifier*>& getDirectChildren() const { return this->directChildren_; }
@@ -209,8 +209,8 @@
 
         private:
-            std::set<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to
+            std::list<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to (sorted by their order of initialization)
             std::set<const Identifier*> children_;                         //!< The children of the class the Identifier belongs to
 
-            std::set<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to
+            std::list<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to (sorted by their order of initialization)
             std::set<const Identifier*> directChildren_;                   //!< The direct children of the class the Identifier belongs to
 
Index: code/branches/core7/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10371)
+++ code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10372)
@@ -216,9 +216,11 @@
             if (this->recordTraceForIdentifier_)
             {
-                if (this->identifierTraceOfNewObject_[identifiable].insert(identifiable->getIdentifier()).second == false)
+                std::list<const Identifier*>& traceForObject = this->identifierTraceOfNewObject_[identifiable];
+                if (std::find(traceForObject.begin(), traceForObject.end(), identifiable->getIdentifier()) != traceForObject.end())
                 {
                     orxout(internal_warning) << this->recordTraceForIdentifier_->getName() << " inherits two times from " <<
                         identifiable->getIdentifier()->getName() << ". Did you forget to use virtual inheritance?" << endl;
                 }
+                traceForObject.push_back(identifiable->getIdentifier());
             }
         }
Index: code/branches/core7/src/libraries/core/class/IdentifierManager.h
===================================================================
--- code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10371)
+++ code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10372)
@@ -38,5 +38,5 @@
 
 #include <map>
-#include <set>
+#include <list>
 #include <string>
 
@@ -111,5 +111,5 @@
             /// Used while creating the object hierarchy to keep track of the identifiers of a newly created object (and all other objects that get created as
             /// a consequence of this, e.g. nested member objects).
-            std::map<Identifiable*, std::set<const Identifier*> > identifierTraceOfNewObject_;
+            std::map<Identifiable*, std::list<const Identifier*> > identifierTraceOfNewObject_;
             Identifier* recordTraceForIdentifier_; //!< The identifier for which we want to record the trace of identifiers during object creation. If null, no trace is recorded.
     };
Index: code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10371)
+++ code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10372)
@@ -19,5 +19,5 @@
     namespace
     {
-        class BaseInterface1 : public OrxonoxInterface
+        class BaseInterface1 : virtual public OrxonoxInterface
         {
             public:
@@ -30,5 +30,5 @@
         };
 
-        class BaseInterface2 : public OrxonoxInterface
+        class BaseInterface2 : virtual public OrxonoxInterface
         {
             public:
@@ -155,4 +155,9 @@
         };
 
+        bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
+        {
+            return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
+        }
+
         bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
         {
Index: code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10371)
+++ code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10372)
@@ -58,4 +58,9 @@
                 }
         };
+
+        bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
+        {
+            return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
+        }
 
         bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
Index: code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10371)
+++ code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10372)
@@ -121,4 +121,9 @@
         };
 
+        bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
+        {
+            return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
+        }
+
         bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
         {
Index: code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10371)
+++ code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10372)
@@ -63,4 +63,9 @@
                 }
         };
+
+        bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
+        {
+            return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
+        }
 
         bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
Index: code/branches/core7/test/core/class/SuperTest.cc
===================================================================
--- code/branches/core7/test/core/class/SuperTest.cc	(revision 10371)
+++ code/branches/core7/test/core/class/SuperTest.cc	(revision 10372)
@@ -97,5 +97,5 @@
 
             EXPECT_EQ(1u, identifier->getDirectParents().size());
-            EXPECT_TRUE(identifier->getDirectParents().find(Class(TestClass)) != identifier->getDirectParents().end());
+            EXPECT_TRUE(std::find(identifier->getDirectParents().begin(), identifier->getDirectParents().end(), Class(TestClass)) != identifier->getDirectParents().end());
         }
         {
@@ -106,5 +106,5 @@
 
             EXPECT_EQ(1u, identifier->getDirectParents().size());
-            EXPECT_TRUE(identifier->getDirectParents().find(Class(BaseObject)) != identifier->getDirectParents().end());
+            EXPECT_TRUE(std::find(identifier->getDirectParents().begin(), identifier->getDirectParents().end(), Class(BaseObject)) != identifier->getDirectParents().end());
         }
     }
