Fix a bug in group task handling, introduce a "pending" state in tasks

Signed-off-by: Rick Copeland <rick@arborian.com>