Add support for deep inheritance substitutions.
Merge pull request #149 from nemtsov/feature/multi_level_inheritance

Support for deep inheritance substitutions