Fixed #4667: Remove DEBUG preprocessor macro in templates