Fix bug in detecting enums in hierarchy files.