This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
]) {
          let newRefs = [];
          for (const ref of refs) {
            newRefs = ref
              .filter(x => x !== null)
              .reduce((a, b) => a.concat(b), newRefs);
          }
          if (newRefs.length === 0) {
            
            return stream.bytes;
          }
          const xfa = (acroForm instanceof Dict && acroForm.get("XFA")) || [];
          let xfaDatasets = null;
          if (Array.isArray(xfa)) {
            for (let i = 0, ii = xfa.length; i < ii; i += 2) {
              if (xfa[i] === "datasets") {
                xfaDatasets = xfa[i + 1];
              }
            }
          } else {
            
            warn("Unsupported XFA type.");
          }
          let newXrefInfo = Object.create(null);
          if (xref.trailer) {
            
            const infoObj = Object.create(null);
            const xrefInfo = xref.trailer.get("Info") || null;
            if (xrefInfo instanceof Dict) {
              xrefInfo.forEach((key, value) => {