CheckExceptionSafety: Fixed crash when a function is missing function scope