Optimizer now ensures presence of all dependencies.