Uniquify names on a per-module basis

Name mangling resulted in occasional collisions, e.g. foo.bar would become
foo_bar, which could conflict with a node truly named foo_bar.