Share tags2

Supersedes #11351.
After my first look at the code it looks quite good.