It's the apostrophe in one of the labels that did it. I thought the `""' construction in `splitvallabels' could deal with it, but it can't. Will have to change the labels I guess. Also see here.