What happens when you apply theano.tensor.as_tensor_variable to the second argument of your deterministic node?
theano.tensor.as_tensor_variable