Judge says council case against contested wind project has “gone off the rails” and orders it to re-plead its case.