Bug fix in copying regular expressions.