Fixes RM6036: move IPAddress filter to ON clause of JOIN