Index: code/branches/core7/src/libraries/core/CoreIncludes.h
===================================================================
--- code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10511)
+++ code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10512)
@@ -218,29 +218,16 @@
     class _CoreExport StaticallyInitializedIdentifier : public StaticallyInitializedInstance
     {
-        struct InheritsFrom
+        template <class T>
+        struct InheritsFromClass : public Identifier::InheritsFrom
         {
-            virtual ~InheritsFrom() {}
-            virtual Identifier* getParent() = 0;
-        };
-
-        template <class T>
-        struct InheritsFromClass : public InheritsFrom
-        {
-            virtual Identifier* getParent() { return Class(T); }
+            virtual Identifier* getParent() const { return Class(T); }
         };
 
         public:
             StaticallyInitializedIdentifier(Identifier* identifier) : identifier_(identifier) {}
-            ~StaticallyInitializedIdentifier()
-            {
-                for (size_t i = 0; i < this->parents_.size(); ++i)
-                    delete parents_[i];
-            }
 
             virtual void load()
             {
                 IdentifierManager::getInstance().addIdentifier(this->identifier_);
-                for (size_t i = 0; i < this->parents_.size(); ++i)
-                    this->identifier_->inheritsFrom(this->parents_[i]->getParent());
             }
 
@@ -255,5 +242,5 @@
             template <class T>
             inline StaticallyInitializedIdentifier& inheritsFrom()
-                { this->parents_.push_back(new InheritsFromClass<T>()); return *this; }
+                { this->identifier_->inheritsFrom(new InheritsFromClass<T>()); return *this; }
 
             inline StaticallyInitializedIdentifier& virtualBase()
@@ -262,5 +249,4 @@
         private:
             Identifier* identifier_;
-            std::vector<InheritsFrom*> parents_;
     };
 
Index: code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10511)
+++ code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10512)
@@ -79,4 +79,7 @@
             delete this->factory_;
 
+        for (std::list<const InheritsFrom*>::const_iterator it = this->manualDirectParents_.begin(); it != this->manualDirectParents_.end(); ++it)
+            delete (*it);
+
         for (std::map<std::string, ConfigValueContainer*>::iterator it = this->configValues_.begin(); it != this->configValues_.end(); ++it)
             delete (it->second);
@@ -121,10 +124,10 @@
      * @brief Used to define the direct parents of an Identifier of an abstract class.
      */
-    Identifier& Identifier::inheritsFrom(Identifier* directParent)
-    {
-        if (this->parents_.empty())
-            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;
+    Identifier& Identifier::inheritsFrom(InheritsFrom* directParent)
+    {
+        if (this->directParents_.empty())
+            this->manualDirectParents_.push_back(directParent);
+        else
+            orxout(internal_error) << "Trying to manually add direct parent of " << this->getName() << " after the latter was already initialized" << endl;
 
         return *this;
@@ -183,11 +186,15 @@
             this->verifyIdentifierTrace();
         }
-        else if (!this->directParents_.empty())
+        else if (!this->manualDirectParents_.empty())
         {
             // no parents defined -> this class was manually initialized by calling inheritsFrom<Class>()
 
             // initialize all direct parents
-            for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
-                const_cast<Identifier*>(*it)->finishInitialization(); // initialize parent
+            for (std::list<const InheritsFrom*>::const_iterator it = this->manualDirectParents_.begin(); it != this->manualDirectParents_.end(); ++it)
+            {
+                Identifier* directParent = (*it)->getParent();
+                this->directParents_.push_back(directParent);
+                directParent->finishInitialization(); // initialize parent
+            }
 
             // direct parents and their parents are also parents of this identifier (but only add them once)
Index: code/branches/core7/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10511)
+++ code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10512)
@@ -112,4 +112,11 @@
     {
         public:
+            struct InheritsFrom //! helper class to manually define inheritance
+            {
+                virtual ~InheritsFrom() {}
+                virtual Identifier* getParent() const = 0;
+            };
+
+        public:
             Identifier(const std::string& name, Factory* factory, bool bLoadable);
             Identifier(const Identifier& identifier); // don't copy
@@ -149,5 +156,5 @@
             ////// Class Hierarchy //////
             /////////////////////////////
-            Identifier& inheritsFrom(Identifier* directParent);
+            Identifier& inheritsFrom(InheritsFrom* directParent);
 
             void initializeParents(const std::list<const Identifier*>& initializationTrace);
@@ -219,4 +226,5 @@
             void addIfNotExists(std::list<const Identifier*>& list, const Identifier* identifierToAdd) const;
 
+            std::list<const InheritsFrom*> manualDirectParents_;            //!< Manually defined direct parents
             std::list<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to (sorted by their order of initialization)
             std::list<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to (sorted by their order of initialization)
