Judges’ ruling rewrites UN Charter on self-defence