hasReference(scope, name) {
    return this.references.get(scope).has(name);
  }
has a Reference in the given {Scope} or a child Scope

Refer {addReference} to know why the following call will be valid
for detecting references in child Scopes

@param {Scope} scope
@param {String} name