[JENKINS-25163][JENKINS-25188] Take into account jobs with no labels