Strip the insert tag flags before passing the tag name to the hooks (see #6860)