fixed for case when enums merge with modules + added a test case