No, rewatch. He CONSTANTLY states that he is the seventeenth prince, not seventeenth in line.
If he was seventeenth in line, that would make no sense. That would mean both Cornelia and Schneibel occupy the same position in the royal line.
There are two distinct lines for Princes and Princesses.
I assume the entire thing is set up like the Chronicle of Amber by Zelazny if anyone has those. There were Princes and Princesses with a direct line of ascension, but in the end, the King was the one who would decide who followed him, regardless of succession order.
In fact, in all of Code Geass, they don't really refer to succession order. They only refer to what Prince or Princess they are.
Also, Chronicles of Amber is a lot like Code Geass, at least until shit goes batshit crazy towards the end.
Lelouch is a lot like Corwin in terms of motivation (revenge against the family, trying to figure out who set someone up, and an unnatural incest love of his sister).