In a three-level HLM in R (lme4), does the 2nd level need to have unique values? I'm working on an analysis of a team-based dataset, where teams of 3 compete against each other under specific, identical tasks. The hierarchy therefore is person :: team :: task. Or, put another way, 6 people :: 2 teams :: 1 task. I am using lme4 in R for linear regression (to predict a continuous variable).
For the hierarchy, I'm writing in the regression equation (1|team) and (1|task) for random effects (with a bunch of other fixed effect variables). However, in our dataset, each set of teams within any task is coded as "left" or "right" team (ie., 0 or 1, across each task). 
When setting up the regression equation in lme4, do I need to recode team_id as a unique value taking into account task_id? E.g., I could concatenate to get unique team values, so task_1_team_0, task_1_team_1, task_2_team_0, task_2_team_1, etc.? Or will the lme4 package take care of this for me, and I can keep the 2nd level values as 0 and 1?
I want to make sure that it is not putting half the dataset into one team and half into another team, because they are all coded the same, and then applying the task level on top of "two" teams.
 A: There are a couple of issues here.
What you have here is a nested design: teams are "nested within" task, so you should specify the random effects term as (1|task/team).  You could also write it as (1|task) + (1|task:team), or if you made the team values unique as you suggested in your question, you could specify (1|task)+(1|team).
As discussed in Ch. 13 of Fox et al:

Most of the software that can handle both crossed and nested random effects can automatically detect when a nested model is appropriate, provided that the levels of the nested factor are uniquely labeled. That is, the software can only tell individuals are nested if they are labeled as A1, A2, ... , A10, B1, B2, ... B10, ... If individuals are instead identified only as 1, 2, ... 10 in each of species A, B, and C, the software can’t tell that individual #1 of species A is not related to individual #1 of species B. In this case you can specify nesting explicitly, but it is safer to label the nested individuals uniquely.

This is also discussed briefly at http://glmm.wikidot.com/faq#nestedorcrossed .
If you really only have two tasks, then it's not really feasible to treat task as a random effect (it might not make sense from a conceptual/philosophical point of view either): you should instead treat task as a fixed effect, i.e. 
response ~ ... + task + (1|task:team), ...

