Fix concurrent add to non-concurrent set in R8 partial

Fixes: b/417109930
Change-Id: I4c17f026bddd8731adc112df3d54f7d14e4586fb
diff --git a/src/main/java/com/android/tools/r8/shaking/reflectiveidentification/ReflectiveIdentification.java b/src/main/java/com/android/tools/r8/shaking/reflectiveidentification/ReflectiveIdentification.java
index 446f12a..11974cd 100644
--- a/src/main/java/com/android/tools/r8/shaking/reflectiveidentification/ReflectiveIdentification.java
+++ b/src/main/java/com/android/tools/r8/shaking/reflectiveidentification/ReflectiveIdentification.java
@@ -103,7 +103,7 @@
     }
   }
 
-  public void enqueue(ProgramMethod method) {
+  public synchronized void enqueue(ProgramMethod method) {
     worklist.add(method);
   }