Localize the business logic that processes use statements
Split getUsedModule in to two functions; one function to handle the "initialization" call (which use to rely on (useCall == NULL), and a second to handle the "natural" recursion
Rename add_class_to_hierarchy to use camelCase.  Split the implementation in to 2 functions; the first function handles the initialization case where localSeenPtr had the default value of NULL in the original definition, and the second function handles the "true recursion".
Split lookup in to 2 functions; one for the init case and a second for the true recursion
Convert the recursive version of lookup to be single-entry/single-exit at the cost of an extra level of nesting for the bulk of the definition.  I assert definition is too long and nesting issue would be less noticeable with some refactoring
Split buildBreadthFirstModuleList in to 2 functions; one for the init and one for the "true recursion"
Fix "typo"