Shape Selectivity by Guest-Driven Restructuring of a Porous Material