Added check for dynamic dependency injection.