   recurse message
   descendants
 
-naturallyVisibleQuery =
+## Recompute this every time to make sure no one modifies it.
+naturallyVisibleQuery = ->
   published: $ne: false    ## published is false or Date
   deleted: $ne: true
   private: $ne: true

        body: re
      ]
    else
      naturallyVisibleQuery
  ## Wild group case effectively unions over all groups
  ## (duplicating logic below when it helps make shorter queries).
  if group == wildGroup

    if user?.username
      re = atRe user
      $or: [
        naturallyVisibleQuery()
      ,
        "authors.#{escapeUser user.username}": $exists: true
      ,
