Added propagation of DEBUG and RETURN traps to functions