Uhmm ... I think I will refactor further that last snipped, maybe putting everything in a class. As it is, probably generatemetaclass does not store the metaclasses correctly. Anyway, the idea is clear and solving the metaclass conflict at all orders does not seem so difficult ... Michele