Share tags2

Supersedes #11351.
What I mean is that it would be probably be nicer to return the tags instead of setting this directly on the object for the sake of function purity and clearer dependencies. Will take a look at the full code later on though, maybe the diff is not clear enough