The production arity is encoded in the klabel string by the number of '_'s. So, unless there is some weird use of the klabel, this assumption is safe.