               , callback)()
             , callback
           , callback
-        , callback
+        , callback)
       ,
         =>
           document

      return callback error if error
      cursor = collection.find {_schema: currentSchema, cached: {$exists: true}, cachedId: {$exists: false}}, {source: 1, foreignId: 1}
      document = null
      async.doWhilst Meteor.bindEnvironment (callback) =>
          cursor.nextObject Meteor.bindEnvironment (error, doc) =>
            return callback error if error
            document = doc

              , callback)()
            , callback
          , callback
        , callback)
      ,
        =>
          document
