fix: make sure that our concurrency check ignore packages without task (#6790)
The validation check to ensure the persistent task count doesn't exceed
concurrency did not check if the package actually contained a particular
task, leading to erroneous validation when running persistent tasks if
you have more than N packages in the project.