Alternative to XML PATH
Removing the ORDER BY worked wonders and slightly altering the code:

,SUBSTRING(STUFF((SELECT ', '+TEAM FROM @TEAMMEMBER WHERE E.OID = CAREPROVIDEROID FOR XML PATH('')),1,1,''),2,4000) AS TEAMS