code: protected Map<String, Object> getReplacedAttributes(int scope) {
          if (replacedAttributes == null) {
              replacedAttributes = new ArrayList<>();
          }
          while (replacedAttributes.size() <= scope) {
              replacedAttributes.add(new HashMap<String, Object>());
          }
          return replacedAttributes.get(scope);
      }
docs: retrieves the registry for one scope