BGP peering issue/duplicate peers

I’m noticing a issue with BGP monitoring and Huawei switches.
LibreNMS keeps adding duplicates of the same peerings …
We have around 40 real peerings in the switches but LibreNMS reports that we have over 1000 peerings…

This started with the newest version of LibreNMS

====================================

Component Version
LibreNMS 22.8.0-102-gfd6fdeeb5
DB Schema 2022_09_03_091314_update_ports_adsl_table_with_defaults (246)
PHP 8.1.10
Python 3.9.7
Database MariaDB 10.5.16-MariaDB
RRDTool 1.7.0
SNMP 5.8

====================================

[OK] Composer Version: 2.4.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[WARN] Using database for locking, you should set CACHE_DRIVER=redis
[OK] rrdtool version ok
[OK] Connected to rrdcached

And an update on this…
I noticed that while running discovery I get an error like this:

Load disco module bgp-peers

SQLSTATE[HY093]: Invalid parameter number (SQL: SELECT COUNT() from bgpPeers WHERE device_id = 900 AND bgpPeerIdentifier = 172.31.244.204 AND vrf_id IS NU LL ) (SQL: SELECT COUNT() from bgpPeers WHERE device_id = 900 AND bgpPeerIden tifier = 172.31.244.204 AND vrf_id IS NULL )#0 /opt/librenms/includes/discove ry/bgp-peers/vrp.inc.php(91): dbFetchCell()
#1 /opt/librenms/includes/discovery/bgp-peers.inc.php(12): include(’…’)
#2 /opt/librenms/includes/discovery/functions.inc.php(153): include(’…’)
#3 /opt/librenms/discovery.php(118): discover_device()
#4 {main}