[PATCH 5.17 306/772] libbpf: Fix logic for finding matching program for CO-RE relocation