Judge tells Post Office their cases were a 'sham'