fixes a bug when root package depends on itself