I was able to answer my own question.
Instead of:
{if(sum(that.modes_sq1.NAOK) > 1, 'more than one', 'irrelevant')}
I should have used:
{if(sum(that.modes.sq_sq1.NAOK) > 1, 'more than one', 'irrelevant')}
the "sq" after modes is a reserved term.
So the in general the function would be
Sum(that.questionName.sq_subquestionName.NAOK)
Instead of:
{if(sum(that.modes_sq1.NAOK) > 1, 'more than one', 'irrelevant')}
I should have used:
{if(sum(that.modes.sq_sq1.NAOK) > 1, 'more than one', 'irrelevant')}
the "sq" after modes is a reserved term.
So the in general the function would be
Sum(that.questionName.sq_subquestionName.NAOK)