LT-14625 stage 2: updating guid where Next style invalid

Fixes a problem introduced by trying to copy the Next field
of a style to which we are adding a guid. If the value of Next
is not valid according to current rules, setting it on the copy
throws, and this was crashing the program.

Change-Id: I6e372466c9b1244fb55a561ba32f49592ac5150c