add params properly when using wildcard

fix #8071
           Map<String, String> nextParams = null;
            if (params != null) {
                nextParams = newHashMap();
                nextParams.putAll(params);
            }
            T res = node.retrieve(path, index + 1, nextParams);
            if (res == null && !usedWildcard) {
                node = children.get(wildcard);
                /*
                if (nextParams != null) {
                    nextParams.clear();
                }
                */
                if (node != null) {
                    put(params, node, token);
                    res = node.retrieve(path, index + 1, nextParams);
                }
            }

            /*
            if (res != null && nextParams != null) {
                params.putAll(nextParams);
            }
            */

            return res;

you mean this?  If node.retrive() returns null, nextParams may contain a namedWildcard(the next node may be namedWildcard) and we need to clear it. How can we save right params if we don't put nextParams into params?