Fix a bug where the parent of a module could be mutated inadvertantly creating properties which otherwise shouldn't have existed