Fixes RM6714: move IPAddress filter to ON clause of JOIN (used IPs)
Merge pull request #142 from asadoughi/ip_avail_used_ips_zero

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