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

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #192 from ddobrev/master

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