Big blow to govt as court sets aside parts of Mining Charter