In your case loop should be detected as per algorithm I’ve described above.
(Un)Fortunately there is a bug in current implementation, that breaks loop detection for operations called from js scripts. So if you make a change from JS script, that chain I’ve described above is broken and starts anew.
Some day I will fix it and your rule will break
For scripts we can improve though, and check actual fiberyApi calls from scripts, if they are duplicated in a chain. Cannot promise anything concrete here. When I’ll dig into the issue above, I’ll think deeper how to make scenarios like yours available.