We consider consequences of triviality of cobordism classes and anomaly cancellation in supergravity theories in $d>6$. We argue that this leads to the existence of certain defects which we call I-folds (a generalization of orientifolds). The requirement that compactifications to lower dimensions involving these defects be anomaly free leads to conditions on the higher dimensional theory. We show that in theories with 16 supercharges in $d>6$ this leads to restrictions on the rank of the allowed gauge groups and thus provides an explanation for the observed restrictions in known string theory constructions. In particular, in eight and nine dimensions the only solutions to our constraints are precisely the ones realized in string theory compactifications. We also use these techniques to place constraints on the global structure of the gauge group in eight and nine dimensions.