"ValidateSPF : The script failed due to call depth overflow."
"Resolve-SPFRecord : The script failed due to call depth overflow."
As an example, there is tek-experts.com which has include:ynvholdings.com.cy in the SPF record, while ynvholdings.com.cy has include:tek-experts.com.
https://mxtoolbox.com/SuperTool.aspx?action=spf%3atek-experts.com
I'd assume that your script should be coded to allow the first include: expansion, but not go ahead with the second expansion to resolve this issue - i.e., don't expand any includes that mention the domain which is being queried, or at least flag them up and show a note or something.