Judges in San Francisco and Baltimore separately found legal problems with the way the mass terminations were carried out.