Obviously it is related to interpreter, but hard to tell exactly why, it is not open source, we can only speculate. IMO it is not strict enough and allows performing code with buggy behavior when code is written as not expected by its rules, but some rules are not fully documented.
In this case when function is performed inside interpreter expect return value assigned to variable and when code is not written like that it goes into some buggy flow, if interpreter was made more strict then it will not allow to execute such code that will break some rule to be performed correctly.
See also something similar here → http://forum.mikrotik.com/t/conditional-not-boolean-bug-with-onerror-new-in-7-13/172543/19