A Spanish company on Wednesday lost its attempt to legitimize a tax scheme declared illegal by the European Commission when the European Union’s General Court rejected its appeal, refusing to disturb prior decisions in the long-running dispute.