Under the equal protection clause of the Fourteenth Amendment and the California equivalent, a prisoner who has obtained an appellate reversal of his conviction late in his prison term after an SVP petition has been filed, and who has not been retried and reconvicted can not be subjected to SVP proceedings. Petitioner had two prior sets of convictions for sex offenses occurring in 1982 and 1988. After completing the prison term for the 1988 offenses, he was released on parole in 1995 and completed parole in 1998. In 2000, he was convicted for failure to register and sentenced to five years in prison. In 2003, the district attorney filed a petition under the SVP statute. In 2004, petitioner’s failure to register conviction was reversed and the prosecution ultimately chose not to refile the charges. Penal Code section 6601, subdivision (a)(2) provides that an SVP petition shall not be dismissed on the basis of a later judicial or administrative determination that the individual’s custody was unlawful, if the custody was the result of a good faith mistake of fact or law. The Supreme Court ruled that this section applied to those prisoners whose initial custody was valid, such as those in custody as a result of erroneous parole revocations or extensions of sentence, but did not apply to the prisoner in petitioner’s position where, because of the reversal, he only has been charged but not convicted of a felony offense. Analogizing the SVP Act to the LPS Act, the court found that the petition against petitioner resulted in unequal treatment with those similarly situated. SVP proceedings could be brought against petitioner only if he were retried and convicted of the new offense.