Don't crash on arena curses against team friendly (#9009)

(cherry picked from commit 37ceb3cf76fa590f52c5c31f389686505cfd61f5)