substitute has a 'recurse' option to support nested templates (the previous default behavior). Normal operation is now a single level substitution which is tolerant of brackets in the replacement string. [fixes #2526011].
Moving thumb image onload logic inside a Y.later for now due to IE reporting img.complete == false inside the onload handler. Need to change this to use img.readyState test, but needs more research. Tracked in bug #2528288