Issue 4078: Tag cache key consistency

Issue 4078: Tag cache key consistency

Calling "self.class" on different kinds of tags in different places was leading to failures in cache invalidation.