Fix Groovy scoping issue in the friendsuggest example, also described in #1.

See #1 for the Groovy error. This should fix the scoping issue, while also making the code a bit more clear.