Make sure actors are removed from control groups when captured

Fixes #5976.
Merge pull request #5991 from obrakmann/fix5976

Make sure actors are removed from control groups when captured