Bug 17913: Use replace_with instead of insert_grouped_field