Nicely done @Shevliaskovic, I thought I was the only person who caught that.
But there is also the fact that Gollum never actually swore to serve Frodo, he swore to serve the Master of the Precious:
‘Down! down!’ said Frodo. ‘Now speak your promise!’
‘We promises, yes I promise!’ said Gollum. ‘I will serve the master of
the Precious. Good master, good Sméagol, gollum, gollum!’ Suddenly
he began to weep and bite at his ankle again.
And we know from the Silmarillion that:
Then Ilúvatar spoke, and he said: 'Mighty are the Ainur, and mightiest among them is Melkor; but that he may know, and all the Ainur, that I am Ilúvatar, those things that ye have sung, I will show them forth, that ye may see what ye have done. And thou, Melkor, shalt see that no theme may be played that hath not its uttermost source in me, nor can any alter the music in my despite. For he that attempteth this shall prove but mine instrument in the devising of things more wonderful, which he himself hath not imagined.'
So wouldn't it be a twist of irony if, as this passage indicates, the "Master of the Precious" is not Frodo, nor Sauron even, but Ilúvatar himself? And that absolves Gollum, somewhat, because in the end he did serve Ilúvatar's purpose, a purpose which Gandalf foresaw.