[FIXED JENKINS-17409] looselyMatches throws exception if second parameter (repository) is null

[JENKINS-17409](https://issues.jenkins-ci.org/browse/JENKINS-17409)