Added 'team_number()' to the list of functions that are evaluated as intrinsic. Also changed the type of TEAM_TYPE (in TypePattern) to be DerivedType rather than IntType.
Implementation now no longer needs the static function MissingDerivedType() hack.
Team is for using a team actual argument in TestCall below at line 323, I don't know how to work this out.