add detection for circular deps