setnames now updates secondary keys, closes #909