Fix crash on certain kinds of corrupted teams