Catch circular inheritance by detecting recursion blowout.
Test for circular inheritance.
Added missing test script.
Merge pull request #1262 from hjoliver/1255.circular-inheritance

Catch circular inheritance by detecting recursion blowout.