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