Worked around problem where only one result was returning. It seems that the names table got in a very bad state. Need to ensure next_name works properly