Compile for LocalRef. (Need for cvx)