diff --git a/java/src/com/google/template/soy/msgs/restricted/MsgPartUtils.java b/java/src/com/google/template/soy/msgs/restricted/MsgPartUtils.java
index <HASH>..<HASH> 100644
--- a/java/src/com/google/template/soy/msgs/restricted/MsgPartUtils.java
+++ b/java/src/com/google/template/soy/msgs/restricted/MsgPartUtils.java
@@ -33,10 +33,10 @@ public class MsgPartUtils {
    * @return Whether there are any plural or select parts.
    */
   public static boolean hasPlrselPart(List<SoyMsgPart> msgParts) {
-    for (SoyMsgPart origMsgPart : msgParts) {
-      if (origMsgPart instanceof SoyMsgPluralPart || origMsgPart instanceof SoyMsgSelectPart) {
-        return true;
-      }
+    // If there is a plrsel part then it has to be the first and only part in the list
+    if (msgParts.size() == 1) {
+      SoyMsgPart rootPart = msgParts.get(0);
+      return rootPart instanceof SoyMsgPluralPart || rootPart instanceof SoyMsgSelectPart;
     }
     return false;
   }
Tweak hasPlrselPart for performance

For messages with plural/select parts they are guaranteed to be the root element in the parts list

 * avoid iterator allocation
 * avoid full scan of parts

This should speed up the cases where it returns true and false.

benchmark results:
[]

super tiny improvement as expected

GITHUB_BREAKING_CHANGES=none

-------------
Created by MOE: <URL>