Fixes RM6714: move IPAddress filter to ON clause of JOIN (used IPs)