Restore module merging in generated code