Detect lookup-prefix automatically