pass along flag in xreplace