code: void prune(AndCriterion criterion) {
  		Set<String> usedLayers = new HashSet<String>();
  		Set<String> badLayers = new HashSet<String>();
  		criterion.serverLayerIdVisitor(usedLayers);
  		findUnmatchedLayers(criterion, usedLayers, badLayers);
  		if (usedLayers.isEmpty()) {
  			criterion.getCriteria().clear();
  		} else if (!badLayers.isEmpty()) {
  			removeUnmatchedLayers(criterion, badLayers);
  		}
  	}
docs: Prune impossible combinations.
  (eg. If And criteria filter different layers, they will return nothing, so they are pruned).