If a feature gives proficiency in a skill you are proficient with, can you always choose any skill to replace that proficiency?

Page 125 of the PHB has this statement:

If a character would gain the same proficiency from two different sources, he or she can choose a different proficiency of the same kind (skill or tool) instead.

This statement is given in the context of character creation, and specifically skill proficiencies given by backgrounds.

Does this rule apply to any feature gained at any level that gives proficiencies, or only at first level?