Proper topological sorting.

I was half-assing it before. We need the whole ass.
Never depend on ourself.

This is contrary to common self-help doctrine, which dictates that one can
always depend on oneself.
More fiddling for mixed-language packages.