Copy unit declaration and its dependencies.
function pickUnit(srcDecls, destDecls, name, picked, stack) {
        var decl = srcDecls[name];
        if (!picked[name]) {
            if (stack[name]) {
                error("Recursive dependency '" + name + "'");
            }
            stack[name] = true;
            for (var i = 0, len = decl._dependencies.length; i < len; i++) {
                var reqName = decl._dependencies[i];
                forEach(srcDecls, reqName, function(depName) {
                    if (depName !== name) {
                        pickUnit(srcDecls, destDecls, depName, picked, stack);
                    }
                });
            }
            destDecls[name] = decl;
            picked[name] = true;
        }
    }