Frustrated flexibility in metal-organic frameworks