Bayern, Carl Theodor Herzog in