Pin methods called from lambdas in argument propagation

Bug: b/366932318
Change-Id: Ie3888ec6788637b897ecdde1027bb1b9aef99305
diff --git a/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorProgramOptimizer.java b/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorProgramOptimizer.java
index 5b5b80c..1b6edb5 100644
--- a/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorProgramOptimizer.java
+++ b/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorProgramOptimizer.java
@@ -314,7 +314,8 @@
             method -> {
               KeepMethodInfo keepInfo = appView.getKeepInfo(method);
               if (!keepInfo.isOptimizationAllowed(options)
-                  || !keepInfo.isShrinkingAllowed(options)) {
+                  || !keepInfo.isShrinkingAllowed(options)
+                  || !keepInfo.isClosedWorldReasoningAllowed(options)) {
                 pinnedMethodSignatures.add(method.getMethodSignature());
               }
             });