Ticket #4510 - Reduced the scope of the safeFunctions variable to avoid a cppcheck style issue