Filtering BLE Devices by device name on Android

Today I found out that on my device, using ScanFilter along with setDeviceName(deviceName) won't work at all while scanning for BLE devices. Apparently, this kind of filtering is broken on Android 6.0 and maybe 7.0.

I used a simple workaround, just made a Set with the device names and filtered manually in the onScanResult(...) method.