Clean self-references from deps.