Fix codegen issue -- code blocks doubled