Fix #13846: .prev sort direction
(cherry picked from commit 9c4a428528cc47b0ef87a273f191c0fbbccc9678)