code: private static void addRef(Map refs, String key, JSDynamic unres) {
      List thisKey = (List) refs.get(key);
      if (thisKey == null) {
        thisKey = new ArrayList();
        refs.put(key, thisKey);
      }
      thisKey.add(unres);
    }
docs: Subroutine to enter a dangling "expected" reference in the refs map