Fix the get_email_addresses_for_group query with local_sites.

Against all odds, some users actually end up trying to set up local sites. In
this case, a user was a member of a review group on a local site, which broke
the query that chooses e-mail addresses for a normal group. I've added a
conditional to only check the user's local_site access if the group in question
has a local site.

Testing done:
Ran unit tests. Before this change, the new test failed. After it, it passes.

Fixes bug 3581.

Reviewed at https://reviews.reviewboard.org/r/6374/
Merge branch 'release-2.0.x'