Perform template optimization in <body> too