Only display template debug info if debugging is turned on. Fixes #189