Prevent the running of sync_rules if they do not need to be applied.

This reverts commit 0671fce4dc16baa23251026b044a1e36febc86be.