Double ref on destructuring

Houston, we have a problem

function controller([element]) {
  const mapState = ({ filter }) => {
  	console.log(element);
  };
}

converted to

function controller(ref) {
  var mapState = function (ref) {
  	var filter = ref.filter;

  	console.log(ref[0]);
  };
}

@Rich-Harris I think your optimization is not optimal when ref is used in deeper scope. In this case it's even incorrect.