Revert "Revert "Fix rule numbering""

This reverts commit c5e3ae3b4ce34a5d4b99a4994d708dd0315651ea.