Code-generation fatal error prevention