Fixes for the Python code generator.
First test.