Move the "findUsedStructTypes" functionality outside of the Module class.