How about adding importlib generation support for makedep? Would that be an overkill?
(Quoting comment on IRC)
this may be a case where a standalone test is better than trying to shoehorn it into the wine test framework
Thanks! My gut feeling was that refcounting machinery is fragile and easily regress-able in nature.
If you think this is not worth staying in the tree, feel free to close this MR at any time.
In the meantime, I'll try to switch to runtime PE generation (which doesn't touch the framework or other parts of wine at all). If it looks good enough, it can land into trunk I guess. If it doesn't, it can always remain out-of-tree.