sha1_file: fix iterating loose alternate objects