The government has won court approval to amend its defence mid-trial in a class action brought by businesses alleging they were harmed when the Rudd Government cancelled a program that subsidised home insulation installations during the economic downturn.