[PATCH 5.18 360/879] libbpf: Fix logic for finding matching program for CO-RE relocation