fix NPE during IElementType.enumerate