public function get_related_tags() {
        $manual = $this->get_manual_related_tags();
        $automatic = $this->get_correlated_tags();
        $relatedtags = array_merge($manual, $automatic);

        // Remove duplicated tags (multiple instances of the same tag).
        $seen = array();
        foreach ($relatedtags as $instance => $tag) {
            if (isset($seen[$tag->id])) {
                unset($relatedtags[$instance]);
            } else {
                $seen[$tag->id] = 1;
            }
        }

        return $relatedtags;
    }