Fixed #4897 (callStackToString is not available when using custom message template)