has not raised a state procedural ground as a defense at any stage of Hinojosa’s federal proceedings. The defense is thus waived. See Trest v. Cain, 522 U.S. 87, 89, 118 S.Ct. 478, 139 L.Ed.2d 444 (1997) (“[Procedural default is normally a defense that the State is obligated to raise and preserve if it is not to lose the right to assert the defense thereafter.” (internal quotation marks and brackets omitted)). And although we may raise procedural default sua sponte, Windham v. Merkle, 163 F.3d 1092, 1100-01 (9th Cir.1998), we decline to do so here. Hinojosa raises a serious question about whether the superi- or court’s dismissal of his claim for improper venue is, in fact, a firmly established and regularly followed rule. See In re Oluwa, 207 Cal.App.3d 439, 255 Cal.Rptr. 35, 37 (1989) (<HOLDING>); Griggs v. Superior Court, 16 Cal.3d 341, 347,
holding habeas petition challenging denial of custody credits is not related to the conditions of  confinement and was properly brought in the district of conviction holding that a habeas petitioner must be in custody under the conviction or sentence under attack at the time his petition is filed recognizing that federal habeas statutes require petitioner to be in custody when petition filed holding that a prisoners right of access to the courts encompasses only a reasonably adequate opportunity to file nonfrivolous legal claims challenging his conviction or conditions of confinement holding that a habeas petition in the court of appeals is the exclusive remedy for challenging the effectiveness of appellate counsel