Calling Custom Method via runScript on a Template

This Forum Thread makes mention of the runScript() expression function creating unexpected behavior in templates. Im not sure if that's what is going on here or if there is a work around..