Here's a new patch that should resolve the actual root of the problem[1]. Thanks to PyTom for the hint about the loader. [1] https://docs.python.org/3/library/sys.html#sys.meta_path