add guards in code generator to temporarily fix tests