function getEnclosingVariableScope (node) {
	// Get to the nearest upper scope
	let nearestScopeableNode = node;
	let nearestScope = scopeManager.acquire(nearestScopeableNode);
	while (
		!nearestScope &&
		nearestScopeableNode &&
		nearestScopeableNode.parent
	) {
		nearestScopeableNode = nearestScopeableNode.parent;
		nearestScope = scopeManager.acquire(nearestScopeableNode);
	}

	// FunctionExpression with a name hold the value of the name in its scope.
	// So, we need to unwrap to get to the real scope with var definitions
	return nearestScope.functionExpressionScope
		? nearestScope.childScopes[0]
		: nearestScope;
}
Gets enclosing scope

@param {Node} node
@returns {Scope}