Fix condition where repo_priority is run against missing repo