Fixes for producer in TX, read the state correctly to determine the
outcome instance.
Merge branch 'master' into amqp-only