Eric, it is due to processinstance is disconnected from the runtime on transaction end so it removes some state related information and one of them is process definition. When enclosing it in command you ensure it will be executed within anther transaction and process instance will be reconnected with the runtime
HTH