@SuppressWarnings("rawtypes")
  private static void mergeInto(Map dest, Object source, boolean replace, Set<Object> parentNodes) {
    if (!parentNodes.add(source)) {
      throw new FileFormatException("Illegal recursive reference in yaml file");
    }
    if (source instanceof Map<?, ?> map) {
      if (replace) {
        dest.putAll(map);
      } else {
        map.forEach(dest::putIfAbsent);
      }
    } else if (source instanceof List<?> nesteds) {
      for (var nested : nesteds) {
        mergeInto(dest, nested, replace, parentNodes);
      }
    }
    parentNodes.remove(source);
  }
SnakeYaml doesn't handle the <a href="https://yaml.org/type/merge.html">merge operator</a> so manually post-process
the parsed yaml object to merge referenced objects into the parent one.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/YAML.java