Adds validation concerning circular structures.

Infinite tree fetching no more.