Fix cyclic messages support in generator. Beginnings of test.

Update issue 130
Status: Started