Try to make the path selection for breadcrumbs more robust