Revert "Use the active transaction when creating a command."

It is incorrect to assume that the current transaction (when a command is created) is the one that should be associated with that command.

This reverts ac536c89757340751a9b6a4af0b26c760e1cad40.