How can i get snmp_exporter to lookup other labels based on value

I am trying to gather counts of BGP prefixes sent to each peer from a Juniper router, using snmp_exporter. There is a SNMP metric for this: jnxBgpM2PrefixOutPrefixes, however this indexes on this do not have the local and remote peer addresses, instead have a index called jnxBgpM2PeerIndex. If i walk jnxBgpM2PeerIndex it gives me the local/remote addresses as indexes and the peer index as value.

How do i join these two things so that the out prefix count is the value, and has local/remote addresses as labels? I have tried using lookups but i think this only works if the thing you are looking up is an index, not a value?

My module config in generator.yml looks like this:
(the overrides are needed to work around a bug in the way the addresses are sent from the device)

juniper_bgp_prefixes:
    walk:
      - jnxBgpM2PrefixOutPrefixes
      - jnxBgpM2PeerIndex
      - jnxBgpM2PeerLocalAddr
      - jnxBgpM2PeerRemoteAddr
    overrides:
      jnxBgpM2PeerLocalAddr:
        type: InetAddressMissingSize
      jnxBgpM2PeerRemoteAddr:
        type: InetAddressMissingSize
    lookups:
      - source_indexes: [jnxBgpM2PeerIndex]
        lookup: jnxBgpM2PeerLocalAddr
      - source_indexes: [jnxBgpM2PeerIndex]
        lookup: jnxBgpM2PeerRemoteAddr
      - source_indexes: [jnxBgpM2PeerIndex]
        lookup: jnxBgpM2PeerRoutingInstance

An example output from this (addresses have been randomized):

# HELP jnxBgpM2PeerIndex This value is a unique index for the remote peer entry in the jnxBgpM2PeerTable - 1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14
# TYPE jnxBgpM2PeerIndex gauge
jnxBgpM2PeerIndex{jnxBgpM2PeerLocalAddr="39.82.154.245",jnxBgpM2PeerRemoteAddr="39.82.154.244",jnxBgpM2PeerRoutingInstance="0"} 1
jnxBgpM2PeerIndex{jnxBgpM2PeerLocalAddr="2001:1234:0000:5000:0000:0000:0000:A5DF",jnxBgpM2PeerRemoteAddr="2001:1234:0000:5000:0000:0000:0000:A5DE",jnxBgpM2PeerRoutingInstance="0"} 3
jnxBgpM2PeerIndex{jnxBgpM2PeerLocalAddr="17.37.63.87",jnxBgpM2PeerRemoteAddr="17.37.63.86",jnxBgpM2PeerRoutingInstance="0"} 0
# HELP jnxBgpM2PeerLocalAddr The address of the local end of the peering session. - 1.3.6.1.4.1.2636.5.1.1.2.1.1.1.7
# TYPE jnxBgpM2PeerLocalAddr gauge
jnxBgpM2PeerLocalAddr{jnxBgpM2PeerLocalAddr="39.82.154.245",jnxBgpM2PeerRemoteAddr="39.82.154.244",jnxBgpM2PeerRoutingInstance="0"} 1
jnxBgpM2PeerLocalAddr{jnxBgpM2PeerLocalAddr="2001:1234:0000:5000:0000:0000:0000:A5DF",jnxBgpM2PeerRemoteAddr="2001:1234:0000:5000:0000:0000:0000:A5DE",jnxBgpM2PeerRoutingInstance="0"} 1
jnxBgpM2PeerLocalAddr{jnxBgpM2PeerLocalAddr="17.37.63.87",jnxBgpM2PeerRemoteAddr="17.37.63.86",jnxBgpM2PeerRoutingInstance="0"} 1
# HELP jnxBgpM2PeerRemoteAddr The address of the remote end of the peering session. - 1.3.6.1.4.1.2636.5.1.1.2.1.1.1.11
# TYPE jnxBgpM2PeerRemoteAddr gauge
jnxBgpM2PeerRemoteAddr{jnxBgpM2PeerLocalAddr="39.82.154.245",jnxBgpM2PeerRemoteAddr="39.82.154.244",jnxBgpM2PeerRoutingInstance="0"} 1
jnxBgpM2PeerRemoteAddr{jnxBgpM2PeerLocalAddr="2001:1234:0000:5000:0000:0000:0000:A5DF",jnxBgpM2PeerRemoteAddr="2001:1234:0000:5000:0000:0000:0000:A5DE",jnxBgpM2PeerRoutingInstance="0"} 1
jnxBgpM2PeerRemoteAddr{jnxBgpM2PeerLocalAddr="17.37.63.87",jnxBgpM2PeerRemoteAddr="17.37.63.86",jnxBgpM2PeerRoutingInstance="0"} 1
# HELP jnxBgpM2PrefixOutPrefixes The number of prefixes for a peer that are installed in that peers Adj-Ribs-Out. - 1.3.6.1.4.1.2636.5.1.1.2.6.2.1.10
# TYPE jnxBgpM2PrefixOutPrefixes gauge
jnxBgpM2PrefixOutPrefixes{jnxBgpM2PeerIndex="0",jnxBgpM2PeerLocalAddr="",jnxBgpM2PeerRemoteAddr="",jnxBgpM2PeerRoutingInstance="",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 7
jnxBgpM2PrefixOutPrefixes{jnxBgpM2PeerIndex="1",jnxBgpM2PeerLocalAddr="",jnxBgpM2PeerRemoteAddr="",jnxBgpM2PeerRoutingInstance="",jnxBgpM2PrefixCountersAfi="1",jnxBgpM2PrefixCountersSafi="1"} 7
jnxBgpM2PrefixOutPrefixes{jnxBgpM2PeerIndex="3",jnxBgpM2PeerLocalAddr="",jnxBgpM2PeerRemoteAddr="",jnxBgpM2PeerRoutingInstance="",jnxBgpM2PrefixCountersAfi="2",jnxBgpM2PrefixCountersSafi="1"} 4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật