checking that struct does not directly contain itself
cycle detection for structs.