debugging: Fixing scoping bug with functions in a catch block