JsVar *jspeiFindInScopes(const char *name) {
  if (execInfo.scopesVar) {
    JsVar *it = jsvLockSafe(jsvGetLastChild(execInfo.scopesVar));
    while (it) {
      JsVar *scope = jsvSkipName(it);
      JsVarRef next = jsvGetPrevSibling(it);
      JsVar *ref = jsvFindChildFromString(scope, name, false);
      jsvUnLock2(it, scope);
      if (ref) return ref;
      it = jsvLockSafe(next);
    }
  }
  return jsvFindChildFromString(execInfo.root, name, false);
}
JsVar *jspeiFindInScopes(const char *name) {
  if (execInfo.scopesVar) {
    JsVar *it = jsvLockSafe(jsvGetLastChild(execInfo.scopesVar));
    while (it) {
      JsVar *scope = jsvSkipName(it);
      JsVarRef next = jsvGetPrevSibling(it);
      JsVar *ref = jsvFindChildFromString(scope, name, false);
      jsvUnLock2(it, scope);
      if (ref) return ref;
      it = jsvLockSafe(next);
    }
  }
  return jsvFindChildFromString(execInfo.root, name, false);
}