Ordering the patterns in mpm_compile_rules.