Fixes issue with tag cache builder

Since cache builders are singletons, before reading tags, the previously read tags need to be removed, i.e. `$tags` needs to be emptied.