Stopgap to avoid excessively long string values (backport)

Change-Id: I9b20d0d4bad5f68cd0cc440ee1995193ecec9abd