List<SimpleKeyValueCondition> sk = new ArrayList<>(Utils.filteredCollection(s.conds, SimpleKeyValueCondition.class));
if (sk.isEmpty()) {
remaining.add(r);
continue;
}
SimpleKeyValueCondition c = sk.get(sk.size() - 1);
Map<String,Set<MapCSSRule>> rulesWithMatchingKey = index.get(c.k);
if (rulesWithMatchingKey == null) {
rulesWithMatchingKey = new HashMap<>();
index.put(c.k, rulesWithMatchingKey);
}