Essentially the same option proposed below by Mr Rube. And the same problem, that her descent lay through the union of Karl Ludwig of the Palatine and the Raugravine, a union condemned as bigamous, and unlawful (not to mention immoral and blasphemous) by German and English law . The latter even more so than the former. By English law, her mother (through whom she must toll her descent) was indubitably a bastard.
In her case, and likewise in those of any of Car II's bastards' issue, there was the problem that the descent could only be regularized by the passing of a law retrospectively legitimizing the bastard offspring (Karoline, the Raugrau, Monmouth etc). As far as I am aware such a thing had never been done , and would be legally very dubious.
The requirement was a lawful Protestant heir. And there was none. (unless someone comes up with that mysterious casket, or the missing register page) . No lawful Protestant heir, can the claims of Jac II & VII be resisted ?
I agree. At this point we might see a slogan of "Better a Papist then a Bastard" which sums up the entire succession problem. Who would England want: a bastard, a legitimate heir who's claims go back to Henry VIII's older sister, which would mean the loss of Scotland, or the legitimate oldest son of James II, who, though Catholic, would have the best claim. In a country like England, legitimacy gos a long way.