MULE-7819 GlobalFunctions lead to memory leaks