add cycle detection in the dependency graph when packing the files