toCodeBlock is confusing as it is heavily tailored for adding the code in the context of a lambda. We could use a toCodeBlock that actually creates a regular multi-statements code block.