Fixed an elusive bug when enums get duplicated as models