Correcting unique check for circular dependencies