rules: fix rules update logic

Comparison was done in the wrong order, preventing rules from being
updated.