Fix an unsafe moment for optional path's parts.