speed up rule extraction by factor 2 (by rewriting rule consolidation to have linear instead of quadratic complexity)