Don't try to estimate transitive deps cost much

And try to do it in a cleaner way