function searchScopes( scope, name ) {
		if ( !scope ) {
			return false;
		}
		if ( scope.set.has( name ) ) {
			// Check whether the definition is due to an implicit global or not:
			return scope.set.get( name ).defs.length > 0;
		}
		return searchScopes( scope.upper, name );
	}
Traverses the parent scopes searching for a variable declaration of the given global variable.

@private
@param {Object} scope - scope to examine
@param {string} name - name of the global variable
@returns {boolean} boolean indicating whether a variable declaration for the given global was found