Fixing DefinedConstant renaming related issues