Moved the "if already part of group"-check up, as we'll encounter that one the most (should speed up the script a bit in the end)