private int getReduced2AfterReduce(ItemPair p, NonTerminal n) {
		IdShareableHashSet<NonTerminal> reduced2 = getReduced2(p);
		if (n.usedInRejectFilter || n.rejectedLiterals != null) {
			IdShareableHashSet<NonTerminal> newReduced = new IdShareableHashSet<NonTerminal>();
			if (reduced2 != null) {
				newReduced.addAll(reduced2);
			}
			newReduced.add(n);
			reduced2 = newReduced;
		}
		
		if (reduced2 == null) {
			return 0;
		}
		if (reduced2.id == 0) {
			IdShareableHashSet<NonTerminal> c = reducedCache.getContained(reduced2);
			if (c != null) {
				return c.id;
			} else {
				if (reducedId == maxReduceSets) {
					throw new RuntimeException("Max reduced sets reached");
				}
				reducedCache.add(reduced2);
				reducedIndex.add(reduced2);
				reduced2.id = reducedId++;
			}
		}
		return reduced2.id;
	}