Factor out full module name generation for local modules.