Handle example objects with nested inner classes.

Before this change they generated an infinite loop.
Merge pull request #16 from brucegodden/inner_classes

Handle example objects with nested inner classes.