Context-Dependent Energetics of Loop Extensions in a Family of Tandem-Repeat Proteins