If what you say were true and in fact we could not use a process variable in the error expression block, the BPMN in the attached image would not be fulfilled, on another level of example I compared 2 variables which I assigned the same value on purpose and I passed a message that would be assigned to an error boundary event output variable.