Issue 1748 - Wrong stringof for templated classes

https://d.puremagic.com/issues/show_bug.cgi?id=1748

Apply patch created by Chris Wright.