Avoided crashes when generating code corresponding to translation units at invalid locations