Judge rules blanket immunity isn’t legal