This test does:
declare variable $var := local:func1();
declare function local:func1() { local:func2($var) };
declare function local:func2($arg2) { 1 };
true()
and expects an error because the declarations are circular.
The actual definition of the error, however, says:
If it is discovered, during static analysis or during dynamic evaluation, that such a cycle exists, error [[err:XQDY0054] must be raised.
This rather unusual wording seems to leave open the possibility that if the error is NOT discovered, it need not be reported. So a processor that decides to return true() without reporting the circularity seems to be conformant.