protected function tagExists($tagName, array $tags)
    {
        foreach ($tags as $tag) {
            if ($tag['tag'] == $tagName) {
                if (array_key_exists('merge_id', $tag)) {
                    return $tag['merge_id'];
                }
                return true;
            }
        }
        return false;
    }