Role assignement period doubled after Checkout (using PayPal)

Project: 
Ubercart
Category: 
bug report
Priority: 
normal
Assigned: 
Unassigned
Status: 
active

Need help, because I am not familiar enough to help with the source code yet (but I'm learning).

I could not figure out why, but uc_roles_order hook is called a second time when I checkout using PayPal. But it does not do it when I checkout using a Money order for instance. So it might be IPN !?
This has for effect to proceed the role assignment as a 'renew' after a 'grant' or 'renew' was already called, which doubles the length of the role assignment and sends two role assignment confirmation emails to the customers (one before the invoice and the second 'renew' one after the invoice).

When I comment module_invoke_all('order', 'update', $order, $status); in uc_order_update_status (oc_order.module), both the calls go away, so it has to come from the order module.

Hopefully, you can reproduce this one on your side. I am running version 5.11 of Drupal with the latest version of all modules as of Oct 14, 2008. I also use the defaults provided in Workflow NG.

Ref. http://drupal.org/node/320933

- - - - - -
2008-10-16 update
Investigated further, function uc_order_action_update_status in ubercart/uc_order/uc_order_workflow.inc gets called twice, so problem is related to Workflow NG

- - - - - -
2008-10-17 update
Might have found a way to resolve this issue. I have added a condition to Workflow rule : Update order status upon checkout completion with full payment

Condition added is : AND Check Order Status is NOT Completed