Juha,
I changed the message between when I copied the code and the logs. Those lines are the lines that produce the error message.
As I mentioned in the original message - I'm aware that there's only one branch in the set. That is the case that this doesn't work. When there's one registration binding in the locations table, t_load_contacts doesn't seem to do anything and as a result t_next_contacts fails. Presumably I could add a special case to detect when there's only a single binding by looking at $branch(count), and not run this code, but that feels like a case that t_load_contacts should handle itself, no?
Best,
Colin