Don't emit JS templates more than once