function buildSourceMapTree(input, loader) {
        const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, ''));
        const map = maps.pop();
        for (let i = 0; i < maps.length; i++) {
            if (maps[i].sources.length > 1) {
                throw new Error(`Transformation map ${i} must have exactly one source file.\n` +
                    'Did you specify these with the most recent transformation maps first?');
            }
        }
        let tree = build(map, loader, '', 0);
        for (let i = maps.length - 1; i >= 0; i--) {
            tree = MapSource(maps[i], [tree]);
        }
        return tree;
    }
Recursively builds a tree structure out of sourcemap files, with each node
being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
`OriginalSource`s and `SourceMapTree`s.

Every sourcemap is composed of a collection of source files and mappings
into locations of those source files. When we generate a `SourceMapTree` for
the sourcemap, we attempt to load each source file's own sourcemap. If it
does not have an associated sourcemap, it is considered an original,
unmodified source file.