Fix Repository.getAllRefs to skip HEAD if it points to an unborn branch