From account activity get recipient id in workflow loop variable

In my case, there are two HTTP actions—one returns identities and the other returns account activities. Both results are processed using separate loops.
I noticed that while the first loop executes correctly, the second loop throws an error when it starts.