Unable to overwrite base template since 1.5.5

I was using packer to overwrite my old templates in VMWare by creating a VM in the same location, then converting it to a template, which worked fine ! But since 1.5.5, it won’t allow me to create a VM because the template isn’t automatically deleted as it was before ! Any ideas or workaround i could use to achieve the same result ?

I am backing up the old template…

105| backup_template()
106| {
107| 
108|   if govc datastore.ls -ds="${PACKER_TEMPLATE_DATASTORE}" "${PACKER_TEMPLATE_NAME}" >/dev/null; then
109|     if govc datastore.cp -f -ds="${PACKER_TEMPLATE_DATASTORE}" "${PACKER_TEMPLATE_NAME}" "${PACKER_TEMPLATE_NAME_BACKUP_TODAY}"; then
110|       export ROCKETCHAT_PACKER_MESSAGE="${ROCKETCHAT_PACKER_MESSAGE_TEMPLATE_BACKUP_CREATE_SUCCESSFUL}"
111|       notify_rocketchat
112|       govc datastore.rm -f -ds="${PACKER_TEMPLATE_DATASTORE}" "${PACKER_TEMPLATE_NAME}"
113|     fi
114|   else
115|     export ROCKETCHAT_PACKER_MESSAGE="${ROCKETCHAT_PACKER_MESSAGE_TEMPLATE_NOT_FOUND}"
116|     notify_rocketchat
117|   fi
118| 
119| }

… and create the new one afterwards.
At the end I am removing old backuped up templates…

140| remove_backuped_template()
141| {
142| 
143|   if govc datastore.ls -ds="${PACKER_TEMPLATE_DATASTORE}" "${PACKER_TEMPLATE_NAME_TO_REMOVE}"; then
144|     if govc datastore.rm -f -ds="${PACKER_TEMPLATE_DATASTORE}" "${PACKER_TEMPLATE_NAME_TO_REMOVE}"; then
145|       export ROCKETCHAT_PACKER_MESSAGE="${ROCKETCHAT_PACKER_MESSAGE_TEMPLATE_BACKUP_REMOVE_SUCCESSFUL}"
146|       notify_rocketchat
147|     fi
148|   else
149|     export ROCKETCHAT_PACKER_MESSAGE="${ROCKETCHAT_PACKER_MESSAGE_TEMPLATE_BACKUP_REMOVE_ERROR}"
150|     notify_rocketchat
151|   fi
152| 
153| }

You could use govc (https://github.com/vmware/govmomi/tree/master/govc) to remove the original template first
govc datastore.rm -f -ds="${PACKER_TEMPLATE_DATASTORE}" "${PACKER_TEMPLATE_NAME}"

I haven’t created a template for a long time. So far, I can’t even remember if the template gets overwritten or if there is an error message.