This reverts commit c4744d04, applies logic introduced in 7b12552e to all types of cursors (not only block ones), and makes other related fixes.