How internal cavities destabilize a protein