A shocking ruling sends Virginia Democrats scrambling as they face a major setback ahead of elections.