entity template serialization is reentrant