Normalize enum value to ClassConstFetch Fixes #930 (cherry picked from commit 8a21ec3182533ee6448a4efb8d238a4163b89297)