Only tell gdb about tasks that belong to the task group at debugger-atta...

...ch.

Resolves #858.