The optimization for (len != MIN_LENGTH) actually only holds for (len > MIN_LENGTH) but (len < MIN_LENGTH) can now happen as len can be changed in the loop before. Change-Id: I3f9f91a540206c80385c5fba96c3d64ab9536752