Added onModuleAlreadyDefined method

For code review. Is OK like this?