Added test for #1630
Fixed #1630, now preventing cycles analysing the model at the level of types isntead of just classes.