IRGen: Remove unsafe usage of static variable
We cannot use 'static' linkage for something that points into the
ASTContext, because there might be more than one ASTContext in a
single process.
Also, fix the spelling mistake in a related function name.