If a key found via ".search also" handler is given a value which contains an unbalanced "\if..." statement, an error occurs, as ilustrated in attachment "test-pgfkeys.tex".
The error occurs because ".search also" handler constructs the ".unknown" handler containing the value within the scope of an "\if".
In the patch, the value is hidden by storing it into a temporary macro.
The patch.
The code producing the error.
Fixed in CVS.