A political party is free to change the rules for nominating candidates however and whenever it chooses. It is free to nullify the decision of those voting in a particular primary. A political party is free to nominate whomever it chooses [and almost certainly multiple candidates for the same office it wishes should it choose].
Ultimately the party, not a judge, chooses whose vote matters and whose doesn't. Placing the imprimatur of the state upon a political party's process doesn't change that or make the process of candidate nomination little 'd' democratic. The people within a political party charged with making the rules for candidate selection are not elected or selected little 'd' democratically. The process of nominating candidates is not little 'd' democratic in any meaningful sense.