diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl
index 567c041cc58ddfdca41745c2e8713b538b765239..e879209d8c7a449936dcd1e6ec6267417af52b76 100755
--- a/src/tools/copyright.pl
+++ b/src/tools/copyright.pl
@@ -48,12 +48,10 @@ sub wanted
 		# We only care about lines with a copyright notice.
 		next unless $line =~ m/$cc.*$pgdg/;
 
-		# We stop when we've done one substitution.  This is both for
-		# efficiency and, at least in the case of this program, for
-		# correctness.
-		last if $line =~ m/$cc.*$year.*$pgdg/;
-		last if $line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
-		last if $line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
+		# We process all lines because some files have copyright
+		# strings embedded in them, e.g. src/bin/psql/help.c
+		$line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
+		$line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
 	}
 	untie @lines;
 }