A question of Go linker source code

In the source code of the Go linker (cmd/link/internal/ld/lib.go), the function “loadlib” loads libraries and parses the object files of each library.

However, I have noticed that there are two strange duplicated loops here, and after reading the relevant code, it seems that the first loop can be removed.

As a Gopher, I would appreciate it if someone familiar with this part could help clarify this issue.