I ran into this also...depending where the patch task is located in the template...the agent may be "busy" when the patch task runs. Can you try a wait action before the patch task? Try like 5 minutes...
You may also want to take a look at this doc: http://community.landesk.com/support/docs/DOC-9526
I actually created a "Provisioning Agent" that was very generic like in the doc, then later in my template I installed my producton agent.
Hope that helps!