You've been answered, but in case it was not in enough detail:
The church is not "invalidated" because subsequent leaders amend or retire the teachings of previous leaders. Not only is this in keeping with the church's concept of continuing revelation (in which God reserves the right to reveal more to people as they have the ability to comprehend it), it is also in keeping with Biblical practices as there are numerous examples of religious leaders - including Jesus himself - amending or even retiring older laws and concepts handed down by past leaders.