diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 3241da95d3b44005caeae9fb5db1c142b1ff9b9a..9e73fc33c916a9f154b82097cf67f6146310877e 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -915,7 +915,7 @@ module Homebrew
         break if previous_version && current_version != previous_version
       end
 
-      if current_version == previous_version &&
+      if current_version == newest_committed_version &&
          current_checksum != newest_committed_checksum
         problem(
           "stable sha256 changed without the version also changing; " \