[JENKINS-17409] looselyMatches does not need to check for repository==null