Bugfixes for incremental code generation