fix the dependency generator to avaid including dependency to itself