I had a look this afternoon and I believe this is an old bug in Ctype.copy that was uncovered by the introduction of more calls to generalize_structure in type_cases (by d43ccfc ).
I'm guessing (but I don't really understand that part of the code) the issue is that in the Tvariant case, we're mutating more.desc, without necessarily having saved it before (e.g. when more.desc is Tnil and partial = Some _).
I'll let someone who knows that part look into the issue further.
Thomas' analysis is correct.
The introduction of the partial parameter in Ctype.copy created a wrong case where more was modified without being copied (since it was not generalized).
As to why it was not triggered before, I believe this is more related to the fact that partial copy is only invoked in type_cases, and this was limited to pattern-matches containing explicit GADT constructors, or polymorphic variants both in the pattern and in the argument type, which is not the case here. In 4.07, this is called always with in principal mode.
Sorry, the analysis of why the bug didn't occur before is wrong: the condition for partial_instance has not changed, just the place where it is computed.
On the other hand I do not see how the extra generalizations in type_cases could be related to that: they only occur after the copy.
Anyway, this original code was incorrect, and I believe this is just by chance that this was not triggered before.