When autodiscovering a new host and auto adding to a template, each item in the template gets linked to an application. This happens not once but the item links to every same application for each host alleready linked to the same template.
When I have 10 hosts in template X, host 11 has for each item in the items_applications table 11 links to all 10+1 defined applications.
This ONLY happens with autodiscovery in combination witch actions.
Unlink and Clear the template en link again solves the problem.