I had something similar happen in a game as the Turks. Essentially after running rampant over Rome and Spain and with a huge culture center in the middle east Russia foolishly declared war on me. About half way through, when my armies were holding the line against Russian Units and preparing a counterattack, suddenly Russia becomes Germany's Vassal! It seemed weird at the time because Russia wasn't at war with Germany, but it makes sense if you think of it like this;
Germany was the superpower of the world (along with me and my faith brothers in Arabia) I was just about to conquer Russia, so Russia decided that being alive but someone's Vassal was better than being dead, so became Germany's vassal so Germany would help them fight their war with me.
So I don't think mine is a bug, but I'm not sure about your case, Were you at war with the Aztecs right after they declared independence?
Hmm, I just now remembered I decided it was a good place to save after getting Arabia to join forces with me aggainst the Germany-France(also a vassal)-Russia Juggernaut.
So excuse me, but I have a World War to fight.