fix for regexp union rewriting