Added functionality for checking for circular deps.