Generator's infinite loop fix

When we try to generate classes for nested embedded documents:
````php
'Model\Parent' => array(
		'fields' => array(
        'foo' => 'string',
    ),
    'embeddedsMany' => array(
        'nodes' => array('class' => 'Model\NestedChild'),
    ),
),
'Model\NestedChild' => array(
    'isEmbedded' => true,
    'fields' => array(
        'foo' => 'string',
    ),
    'embeddedsMany' => array(
        'nodes' => array('class' => 'Model\NestedChild'), # Self-emdebbed model cause an inifnite loop.
    ),
),
````
generator go into infinite loop.

This commit fix it.