BLE.scanWithFilter detects the same peripheral many times

Hey,

I have an Argon that acts as central.
I wanted to test a particular firmware in 6.2.0, so I proceeded to update deviceOS on the device.
By mistake, I did not change the deviceOS selection on Workbench, so the firmware compiled with deviceOS 4.2.0.

Turns out that the scanWithFilter when the firmware is build with 4.2.0 and runs on 6.2.0 gets confused about the filter somehow, it sees the same device many times:

0000095923 [app] INFO: scan() - Found 15 devices
0000095925 [app] TRACE: scan() - Device 1: 21767
0000095925 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095927 [app] TRACE: scan() - Device 2: 21767
0000095927 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095929 [app] TRACE: scan() - Device 3: 21767
0000095929 [app] TRACE: rssi=-27 address=DD:FB:D3:E5:1C:7E 
0000095931 [app] TRACE: scan() - Device 4: 21767
0000095931 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095933 [app] TRACE: scan() - Device 5: 21767
0000095933 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095935 [app] TRACE: scan() - Device 6: 21767
0000095935 [app] TRACE: rssi=-27 address=DD:FB:D3:E5:1C:7E 
0000095937 [app] TRACE: scan() - Device 7: 21767
0000095937 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095939 [app] TRACE: scan() - Device 8: 21767
0000095939 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095941 [app] TRACE: scan() - Device 9: 21767
0000095941 [app] TRACE: rssi=-27 address=DD:FB:D3:E5:1C:7E 
0000095943 [app] TRACE: scan() - Device 10: 21767
0000095943 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095945 [app] TRACE: scan() - Device 11: 21767
0000095945 [app] TRACE: rssi=-25 address=DD:FB:D3:E5:1C:7E 
0000095947 [app] TRACE: scan() - Device 12: 21767
0000095947 [app] TRACE: rssi=-27 address=DD:FB:D3:E5:1C:7E 
0000095949 [app] TRACE: scan() - Device 13: 21767
0000095949 [app] TRACE: rssi=-26 address=DD:FB:D3:E5:1C:7E 
0000095951 [app] TRACE: scan() - Device 14: 21767
0000095951 [app] TRACE: rssi=-24 address=DD:FB:D3:E5:1C:7E 
0000095953 [app] TRACE: scan() - Device 15: 21767
0000095954 [app] TRACE: rssi=-27 address=DD:FB:D3:E5:1C:7E 
0000095965 [app] ERROR: scan() - Setup issue. Found more than one peer, found: 15 devices

If I let the device scan again, it will detect the same device a different number of times, like instead of 15 times, 5 times, or 9 times.

When I realized my "mistake" and updated Workbench to build with DeviceOS 6.2.0, everything ran smoothly (phew!):

0000243343 [app] INFO: scan() - Found 1 device
0000243344 [app] TRACE: scan() - Device 1: 21767
0000243344 [app] TRACE: rssi=-31 address=DD:FB:D3:E5:1C:7E 
0000243345 [app] INFO: scan() - peer found

This is just a heads up in case this deviceOS-build version incompatibility leads to something more important.

Thanks,

Duplicates were present on Gen 4 devices until 5.7.0, when it was fixed to remove duplicates like Gen 3.

Still a bit weird, since this is an Gen 3 Argon, with a firmware built with 4.2.0 that runs on 6.2.0.
Anyway, not an impact on my project, luckily.