What happens when you plug a BSDF into a value socket?
It doesn't do anything. 

Cycles will use the value specified for that socket and ignore the invalid connection:


This example uses a color input, but the same applies for value inputs.

As you can see, the render result is the same with or without the diffuse node in the above setup.

For some explanation on why cycles works like this, see Convert cycles closure (shader) output to colors?
For a workaround, see Is it possible to use the output of a Renderlayer in the material nodes of another RenderLayer?