Fix CurFunction hack

This is even hackier (since we don't get to reset to NULL) but works for all
subclasses of FunctionDecl, such as CXXMethodDecl.