Anonymous enums still creates script constants. Also add a check to see if name used for enum is already defined.