Swapped node.inputs[0].data with theano.tensor.extract_constant(node.inputs[0])

See comment by nouiz: https://github.com/shackenberg/Theano/commit/d799afcae312ce973864ea8039b626c862ca93d2#commitcomment-3726133