Government loses appeal over cuts to solar subsidies