Allow replaceTag to accept arrays as replacement.