Frustration and folding of a TIM barrel protein