It seems like the @selected attribute it not obeyed when a switch is inside a repeat.
Created attachment 224037 [details]
Debugged this a bit. The problem is that switch isn't handling the insertion of cases the best. And case doesn't handle being inserted well at all. It only sets its selected state (mCachedSelectedAttr) during DoneAddingChildren which won't get called in the case of repeat templating since it isn't going through the parser. But to make this work correctly we need to keep in mind the comments in bug 302497 (which, in the end, is probably a duplicate of this bug but we should probably make sure that the testcases for both work when the fix is added). If the repeat contents of a switch is wiped out and replaced due to a repeat rebuilding (caused by a change in the bound nodeset), we need to remember the currently selected case inside the switch and not just go by @selected on the case.
We should also put a test for repeat state inside nsXFormsSwitchElement::Init() and if it is eType_Template, we shouldn't bother doing any work.