protected function unpack_reference($packed) {
        $reference = unserialize($packed);
        if (empty($reference->url)) {
            // The reference is missing some information. Attempt to update it.
            return unserialize($this->fix_old_style_reference($packed));
        }

        return $reference;
    }