I think you have hit a recursion limit on GetNthRecord. As I understand it, the limit exists on all platforms but the limited RAM of an iOS device running Go will reach it much quicker than you will in FileMaker Pro.
You'll need to consider a different approach such as setting up a calculation that can be summarized with a running total summary field instead of GetNthRecord.
Thank you for your post, and I apologize for the late reply.
This has been reported previously, and the explanation from PhilModJunk is correct (Thank you). There simply isn't enough memory on iOS devices (at this time). You can see a similar issue posted last year on the forum at:
One possible workaround is to use a script to accomplish the same result, possibly using an additional stored field.