Avoiding traversing of non-addon optional dependencies