diff --git a/src/Model/Struct.php b/src/Model/Struct.php
index <HASH>..<HASH> 100644
--- a/src/Model/Struct.php
+++ b/src/Model/Struct.php
@@ -362,7 +362,7 @@ class Struct extends AbstractModel
      */
     public function getInheritanceStruct()
     {
-        return $this->getGenerator()->getStructByName(str_replace('[]', '', $this->getInheritance()));
+        return $this->getName() === $this->getInheritance() ? null : $this->getGenerator()->getStructByName(str_replace('[]', '', $this->getInheritance()));
     }
     /**
      * @return string
issue #<I> - fix infinite loop by checking its inheritance name