Add identifier field to global replace, fixes #5268