Fix :func:`inspect.getsource` for generated classes with Python base classes (e.g. enums).