Fix merging enumerated types problem described in http://www.mobileread.com/forums/showthread.php?t=245435