The bug
/team join and /team leave are always successful, even if the team has already a member with the given name respectively the team has no member with that name.
How to reproduce
- Create a team and join it
/team add test /team join test @s
- Try to join it again
/team join test @s
→ It says that you joined the team despite already being a member