regex sets: fix Solaris optimiser bug