Evaluate dynamic fields in event when used with gsub

Closes #1529