Actually check for circular references instead of alawys detecting one

urgh seriously