logilab-astng #45959 AttributeError: 'NoneType' object has no attribute 'frame' [validation pending]

Using pylint on the following script:
import ctypes

class _MetaEnum(ctypes.c_long.__class__):
    '''Meta class for Enum'''
    def __init__(mcs, name, bases, newattrs):
        super(_MetaEnum, mcs).__init__(name, bases, newattrs)
        
        itemValue = -1
        mcs._strings_ = {}      #pylint: disable=C0103
        for field in getattr(mcs, '_fields_'):
            if len(field) == 1:
                itemValue += 1
            else:
                itemValue = field[1]
            setattr(mcs, field[0],  itemValue)
            mcs._strings_[itemValue] = field[0]

class Enum(ctypes.c_long):     
    '''Enum class'''
    _fields_ = []
    __metaclass__ = _MetaEnum
    
    def __init__(self, idOrString = 0):
        cls = type(self)
        self.set(idOrString)
Results in:
Traceback (most recent call last):
  File "s:\devenv\devtools_release\pylint.bat", line 14, in 
    lint.Run(sys.argv[1:])
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\pylint\lint.py", line 856, in __init__
    linter.check(args)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\pylint\lint.py", line 488, in check
    self.check_astng_module(astng, walker, rawcheckers)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\pylint\lint.py", line 563, in check_astng_module
    walker.walk(astng)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\pylint\utils.py", line 516, in walk
    self.walk(child)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\pylint\utils.py", line 513, in walk
    cb(astng)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\pylint\checkers\design_analysis.py", line 191, in visit_class
    nb_parents = len(list(node.ancestors()))
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\logilab\astng\scoped_nodes.py", line 757, in ancestors
    for grandpa in baseobj.ancestors(True, context):
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\logilab\astng\scoped_nodes.py", line 749, in ancestors
    for baseobj in stmt.infer(context):
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\logilab\astng\bases.py", line 303, in wrapped
    for res in _func(node, context, **kwargs):
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\logilab\astng\inference.py", line 175, in infer_name
    frame, stmts = self.lookup(self.name)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\logilab\astng\node_classes.py", line 114, in lookup
    return self.scope().scope_lookup(self, name)
  File "s:\devenv\tools_3rdparty\python\lib\site-packages\logilab\astng\scoped_nodes.py", line 720, in scope_lookup
    frame = self.parent.frame()
AttributeError: 'NoneType' object has no attribute 'frame'
prioritynormal
typebug
done in0.20.3
load left0.000
closed by<not specified>