Remove redundant type+class check
Add simple circularity check