fix #3304

This was a bug in interprocedural type inference. To find the start of a call
cycle, I was looking for the previous frame to not belong to a call cycle,
which is of course wrong since it might belong to a *different* call cycle.
Fixed by marking each call cycle with a unique ID, and comparing.