                                     if err
                                         cb(err)
                                     else if when_sent >= misc.days_ago(7)   # successfully sent < one week ago -- don't again
-                                        done = true
+                                        locals.done = true
                                         cb()
                                     else
                                         cb()

                                    cb()

                    (cb) =>
                        if done
                            dbg("NOT send_email invite to #{email_address}")
                            cb()
                            return

                                ttl           : 60*60*24*14  # valid for 14 days
                                cb            : cb
                    (cb) =>
                        if locals.done
                            cb()
                        else
                            @database.when_sent_project_invite
