src/generators/Generator.js/Generator/findDependencies
class Generator:	findDependencies ( contextDependencies, indexes, expression ) {
		if ( expression._dependencies ) return expression._dependencies;

		let scope = annotateWithScopes( expression );
		const dependencies = [];

		const generator = this; // can't use arrow functions, because of this.skip()

		walk( expression, {
			enter ( node, parent ) {
				if ( node._scope ) {
					scope = node._scope;
					return;
				}

				if ( isReference( node, parent ) ) {
					const { name } = flattenReference( node );
					if ( scope.has( name ) || generator.helpers.has( name ) ) return;

					if ( contextDependencies.has( name ) ) {
						dependencies.push( ...contextDependencies.get( name ) );
					} else if ( !indexes.has( name ) ) {
						dependencies.push( name );
					}

					this.skip();
				}
			},

			leave ( node ) {
				if ( node._scope ) scope = scope.parent;
			}
		});

		dependencies.forEach( name => {
			if ( !globalWhitelist.has( name ) ) {
				this.expectedProperties.add( name );
			}
		});

		return ( expression._dependencies = dependencies );
	}