Fix failing copy of fields when RegexValidator is used. Closes #1954.