There appears to be a recently-introduced bug in the handling of Google Apps Script custom functions.
This is apparently the subject of Issue 5222. (I say "apparently" because that issue report isn't really clear. But good enough.) Star it to get more attention on it, and to receive updates.