I can't provide the source code to this example, and will if needs be spend more time tracking the problem down; but I have a source file which fails with current trunk as follows. Maybe this is a bug in Matching?

I assume this is related to the switch from Lambda.same to Lambda.make_key + the use of the generic comparison. I did not check if there are other possible candidate for introducing a cycle in lambda terms, but there is at least the occurrence of Types.type_expr under Lev_after. This shows that we should probably not rely on the generic comparison... To fix this specific instance, it's probably enough to modify the case for Levent in make_key in order to keep only the location in the lambda_event.