Cation substitution and strain screening in framework structures: The role of rigid unit modes