Temporary fix to work around bug in codegen