[dart2js] Relax constraints on dummy reiver optimization of getter calls

This recovers 3.3k or about 15% of the size regression reported in b/314275739

Change-Id: I8209643719c962ca9c5c83eef805521c26634411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339230
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
diff --git a/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart b/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart
index d46c6f7..c5c1d56 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart
@@ -188,9 +188,13 @@
 
   void tryReplaceExplicitReceiverForTargetWithDummy(
       HInvoke node, Selector? selector, MemberEntity target) {
+    // Automatically generated property extraction closures don't work with the
+    // dummy receiver optimization. If the selector is a getter but the target
+    // is not, we have a 'tear-off'.
+    //
     // TODO(15933): Make automatically generated property extraction closures
     // work with the dummy receiver optimization.
-    if (selector != null && selector.isGetter) return;
+    if (selector != null && selector.isGetter && !target.isGetter) return;
 
     if (usesSelfInterceptor(target)) {
       _replaceReceiverArgumentWithDummy(node, 1);