Simply put, there is a special recurse opcode.
When you have a cycle in the call graph, they all get hashed together as a single unit; you update them together as a single unit too.