[functions] Don't record changed results for a known flaky test

Change-Id: Idea6d791447827940ecc4e973e81afe7c599e6ba
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/157760
Auto-Submit: William Hesse <whesse@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
diff --git a/functions/node/result.dart b/functions/node/result.dart
index a0353c0..261acb5 100644
--- a/functions/node/result.dart
+++ b/functions/node/result.dart
@@ -22,7 +22,8 @@
 const fConfigurations = 'configurations';
 const fActiveConfigurations = 'active_configurations';
 
-bool isChangedResult(Map<String, dynamic> change) => change[fChanged];
+bool isChangedResult(Map<String, dynamic> change) =>
+    change[fChanged] && (!change[fFlaky] || !change[fPreviousFlaky]);
 
 /// Whether the change will be marked as an active failure.
 /// New flaky tests will not be marked active, so they will appear in the