Streamlined `fromPathPiece` implementation.