Model loading resolver code refined.

Circular model loading detection tested.