Fix InheritanceManager when the model has a self reference.

Otherwise, we reach max recursion depth.
Merge pull request #114 from rsenkbeil/inheritance-manager-self-reference

Fix InheritanceManager when the model has a self reference.