CAS-1241: fixed issue where changing type from regex to ant would fail on regex-invalid patterns