This logic could be simplified if you add logic to page_title_breadcrumbs that ignores empty crumbs.