Template.massadd and template.massremove always return an empty hostids property instead of templateids.