(refs #142)Fix NoSuchElementException for empty repository.