This needs to be somewhere else. to_array() combined with joinv is a recipe for segfaults, so this is a layer of protection until I figure out what might be wrong.