apply replacements to exports
apply replacements to module defs, and add testing for merging of overlapping global initializers