Fix sort title update and already broken sort titles.

From #6689.