Merged tagging test from upstream.