When codegenning a transaction we must set the active module in codegen to the given one.
When codegenning a transaction we must set the active module in codegen to the given one.

Add an assertion checking if there is codegen.

perovic/cling,root-mirror/cling,marsupial/cling,marsupial/cling,root-mirror/cling,root-mirror/cling,perovic/cling,karies/cling,root-mirror/cling,marsupial/cling,marsupial/cling,karies/cling,karies/cling,root-mirror/cling,perovic/cling,karies/cling,marsupial/cling,perovic/cling,karies/cling,root-mirror/cling,karies/cling,perovic/cling,marsupial/cling