Actually, I think it should go straight from the module name to the module through the lookup table.  I think all of that handling could be much cleaner.