I think that loyalty is a pact. A pact between two individuals, two countries, groups of people, organizations, ect.
When you pledge allegiance to something, you are pledging allegiance to THAT. If it changes into something that you cannot follow and remain honorable at the same time, then that's not the entity you pledged allegiance to. You are thus absolved of your prior commitment.
For instance, during the battle of Agincourt, Henry's knights refused to kill the french prisoners, even though he had good reason for issuing the order. Yet they were not considered disloyal. It is very possible to remain loyal AND honorable. Besides, I wouldn't place my allegiance to anything that wouldn't make room for morals, if not actively pursuing them.
And that's interesting. I wasn't aware that vengeance for disloyalty spanned generations. I remember that treasonous knights in the WOTR (war of the roses), if executed (Not all of them were), their lands passed on to the crown. But I remember that the sons and family were usually not made to suffer for the father's treason. But it might be done differently on the continent.