Fix dependency and ordering check when collections are explicitly configured and not collected