Follow enum constant renaming.
(cherry picked from commit a8fa8596ce4e05b349fb11c18f388ef8b70f6e6a)
Fixes for some of the defects detected by coverity