Ensure record rewriter keeps tags after setelement