diff --git a/src/btree/bt_curnext.c b/src/btree/bt_curnext.c
index 70c77d5b1..8fbbda737 100644
--- a/src/btree/bt_curnext.c
+++ b/src/btree/bt_curnext.c
@@ -861,6 +861,9 @@ __wt_btcur_next_prefix(WT_CURSOR_BTREE *cbt, WT_ITEM *prefix, bool truncating)
         WT_ERR_TEST(cbt->ref == NULL, WT_NOTFOUND, false);
     }
 
+    /* Give the page this cursor is holding an opportunity to be evicted */
+    WT_ERR(__wt_btcur_evict_reposition(cbt));
+
 err:
     if (total_skipped < 100)
         WT_STAT_CONN_DATA_INCR(session, cursor_next_skip_lt_100);
@@ -905,12 +908,9 @@ err:
  *     Move to the next record in the tree.
  */
 int
-__wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating, bool evict_reposition)
+__wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating)
 {
     WT_RET(__wt_btcur_next_prefix(cbt, NULL, truncating));
 
-    if (evict_reposition)
-        WT_RET(__wt_btcur_evict_reposition(cbt));
-
     return (0);
 }
diff --git a/src/btree/bt_curprev.c b/src/btree/bt_curprev.c
index a090daa27..e6a443726 100644
--- a/src/btree/bt_curprev.c
+++ b/src/btree/bt_curprev.c
@@ -663,7 +663,7 @@ restart_read_page:
  *     Move to the previous record in the tree.
  */
 int
-__wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating, bool evict_reposition)
+__wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating)
 {
     WT_CURSOR *cursor;
     WT_DECL_RET;
@@ -840,7 +840,7 @@ err:
     }
     F_CLR(cbt, WT_CBT_ITERATE_RETRY_NEXT);
 
-    if (ret == 0 && evict_reposition)
+    if (ret == 0)
         WT_RET(__wt_btcur_evict_reposition(cbt));
 
     return (ret);
diff --git a/src/btree/bt_cursor.c b/src/btree/bt_cursor.c
index 76b19fa19..649a5883c 100644
--- a/src/btree/bt_cursor.c
+++ b/src/btree/bt_cursor.c
@@ -562,6 +562,10 @@ __wt_btcur_evict_reposition(WT_CURSOR_BTREE *cbt)
     cursor = &cbt->iface;
     session = CUR2S(cbt);
 
+    /* It's not always OK to release the cursor position */
+    if (!F_ISSET(cursor, WT_CURSTD_EVICT_REPOSITION))
+        return (0);
+
     /*
      * Try to evict the page and then reposition the cursor back to the page for operations with
      * snapshot isolation and for pages that require urgent eviction. Snapshot isolation level
@@ -576,7 +580,7 @@ __wt_btcur_evict_reposition(WT_CURSOR_BTREE *cbt)
         WT_STAT_CONN_DATA_INCR(session, cursor_reposition);
         WT_ERR(__wt_cursor_localkey(cursor));
         WT_ERR(__cursor_reset(cbt));
-        ret = __wt_btcur_search(cbt, false);
+        ret = __wt_btcur_search(cbt);
         /*
          * If we got a WT_ROLLBACK it is because there is a lot of cache pressure and the
          * transaction is being killed - don't panic in that case.
@@ -597,7 +601,7 @@ err:
  *     Search for a matching record in the tree.
  */
 int
-__wt_btcur_search(WT_CURSOR_BTREE *cbt, bool evict_reposition)
+__wt_btcur_search(WT_CURSOR_BTREE *cbt)
 {
     WT_BTREE *btree;
     WT_CURFILE_STATE state;
@@ -695,7 +699,7 @@ __wt_btcur_search(WT_CURSOR_BTREE *cbt, bool evict_reposition)
         WT_ERR(__wt_cursor_key_order_init(cbt));
 #endif
 
-    if (ret == 0 && evict_reposition)
+    if (ret == 0)
         WT_ERR(__wt_btcur_evict_reposition(cbt));
 
 err:
@@ -866,7 +870,9 @@ __wt_btcur_search_near(WT_CURSOR_BTREE *cbt, int *exactp)
         /*
          * We walked to the end of the tree without finding a match. Walk backwards instead.
          */
-        while ((ret = __wt_btcur_prev(cbt, false, false)) != WT_NOTFOUND) {
+	/* Example of temporarioly clearing the can reposition flag. Similar to WT_WITH_DHANDLE */
+	WT_WITHOUT_CURSTD_EVICT_REPOSITION(__wt_btcur_prev(cbt, false));
+        while ((ret = __wt_btcur_prev(cbt, false)) != WT_NOTFOUND) {
             WT_ERR(ret);
             if (btree->type == BTREE_ROW)
                 WT_ERR(__wt_compare(session, btree->collator, &cursor->key, &state.key, &exact));
@@ -1597,7 +1603,7 @@ __wt_btcur_modify(WT_CURSOR_BTREE *cbt, WT_MODIFY *entries, int nentries)
         WT_ERR_MSG(session, ENOTSUP, "not supported in implicit transactions");
 
     if (!F_ISSET(cursor, WT_CURSTD_KEY_INT) || !F_ISSET(cursor, WT_CURSTD_VALUE_INT))
-        WT_ERR(__wt_btcur_search(cbt, false));
+        WT_ERR(__wt_btcur_search(cbt));
 
     WT_ERR(__wt_modify_pack(cursor, entries, nentries, &modify));
 
@@ -1828,7 +1834,7 @@ __cursor_truncate(WT_CURSOR_BTREE *start, WT_CURSOR_BTREE *stop,
  * the end cursor, so we know that page is pinned in memory and we can proceed without concern.
  */
 retry:
-    WT_ERR(__wt_btcur_search(start, false));
+    WT_ERR(__wt_btcur_search(start));
     WT_ASSERT(session, F_MASK((WT_CURSOR *)start, WT_CURSTD_KEY_SET) == WT_CURSTD_KEY_INT);
 
     for (;;) {
@@ -1837,7 +1843,7 @@ retry:
         if (stop != NULL && __cursor_equals(start, stop))
             return (0);
 
-        if ((ret = __wt_btcur_next(start, true, false)) == WT_NOTFOUND)
+        if ((ret = __wt_btcur_next(start, true)) == WT_NOTFOUND)
             return (0);
         WT_ERR(ret);
 
@@ -1885,7 +1891,7 @@ __cursor_truncate_fix(WT_CURSOR_BTREE *start, WT_CURSOR_BTREE *stop,
  * full search to refresh the page's modification information.
  */
 retry:
-    WT_ERR(__wt_btcur_search(start, false));
+    WT_ERR(__wt_btcur_search(start));
     WT_ASSERT(session, F_MASK((WT_CURSOR *)start, WT_CURSTD_KEY_SET) == WT_CURSTD_KEY_INT);
 
     for (;;) {
@@ -1896,7 +1902,7 @@ retry:
         if (stop != NULL && __cursor_equals(start, stop))
             return (0);
 
-        if ((ret = __wt_btcur_next(start, true, false)) == WT_NOTFOUND)
+        if ((ret = __wt_btcur_next(start, true)) == WT_NOTFOUND)
             return (0);
         WT_ERR(ret);
 
diff --git a/src/btree/bt_random.c b/src/btree/bt_random.c
index 83d69f8f4..25cf73fc0 100644
--- a/src/btree/bt_random.c
+++ b/src/btree/bt_random.c
@@ -316,10 +316,10 @@ __random_leaf(WT_CURSOR_BTREE *cbt)
     cbt->slot = 0;
     next = true; /* Forward from the beginning of the page. */
     for (i = __wt_random(&session->rnd) % WT_RANDOM_CURSOR_MOVE;;) {
-        ret = next ? __wt_btcur_next(cbt, false, false) : __wt_btcur_prev(cbt, false, false);
+        ret = next ? __wt_btcur_next(cbt, false) : __wt_btcur_prev(cbt, false);
         if (ret == WT_NOTFOUND) {
             next = !next; /* Reverse direction. */
-            ret = next ? __wt_btcur_next(cbt, false, false) : __wt_btcur_prev(cbt, false, false);
+            ret = next ? __wt_btcur_next(cbt, false) : __wt_btcur_prev(cbt, false);
         }
         WT_RET(ret);
 
@@ -580,7 +580,7 @@ __wt_btcur_next_random(WT_CURSOR_BTREE *cbt)
      * random entry from the first page in the tree that has anything at all.
      */
     if (cbt->ref == NULL)
-        WT_ERR(__wt_btcur_next(cbt, false, false));
+        WT_ERR(__wt_btcur_next(cbt, false));
 
     /* Select a random entry from the leaf page. */
     WT_ERR(__random_leaf(cbt));
diff --git a/src/cursor/cur_file.c b/src/cursor/cur_file.c
index 5d52382bc..e04acbccf 100644
--- a/src/cursor/cur_file.c
+++ b/src/cursor/cur_file.c
@@ -88,9 +88,10 @@ __curfile_next(WT_CURSOR *cursor)
 
     cbt = (WT_CURSOR_BTREE *)cursor;
     CURSOR_API_CALL(cursor, session, next, CUR2BT(cbt));
+    CURSOR_REPOSITION_ENTER(cursor, session);
     WT_ERR(__cursor_copy_release(cursor));
 
-    WT_ERR(__wt_btcur_next(cbt, false, true));
+    WT_ERR(__wt_btcur_next(cbt, false));
 
     /* Next maintains a position, key and value. */
     WT_ASSERT(session,
@@ -98,6 +99,7 @@ __curfile_next(WT_CURSOR *cursor)
         F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT);
 
 err:
+    CURSOR_REPOSITION_END(cursor, session);
     API_END_RET(session, ret);
 }
 
@@ -141,9 +143,10 @@ __curfile_prev(WT_CURSOR *cursor)
 
     cbt = (WT_CURSOR_BTREE *)cursor;
     CURSOR_API_CALL(cursor, session, prev, CUR2BT(cbt));
+    CURSOR_REPOSITION_ENTER(cursor, session);
     WT_ERR(__cursor_copy_release(cursor));
 
-    WT_ERR(__wt_btcur_prev(cbt, false, true));
+    WT_ERR(__wt_btcur_prev(cbt, false));
 
     /* Prev maintains a position, key and value. */
     WT_ASSERT(session,
@@ -151,6 +154,7 @@ __curfile_prev(WT_CURSOR *cursor)
         F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT);
 
 err:
+    CURSOR_REPOSITION_END(cursor, session);
     API_END_RET(session, ret);
 }
 
@@ -194,11 +198,12 @@ __curfile_search(WT_CURSOR *cursor)
 
     cbt = (WT_CURSOR_BTREE *)cursor;
     CURSOR_API_CALL(cursor, session, search, CUR2BT(cbt));
+    CURSOR_REPOSITION_ENTER(cursor, session);
     WT_ERR(__cursor_copy_release(cursor));
     WT_ERR(__cursor_checkkey(cursor));
 
     time_start = __wt_clock(session);
-    WT_ERR(__wt_btcur_search(cbt, true));
+    WT_ERR(__wt_btcur_search(cbt));
     time_stop = __wt_clock(session);
     __wt_stat_usecs_hist_incr_opread(session, WT_CLOCKDIFF_US(time_stop, time_start));
 
@@ -208,6 +213,7 @@ __curfile_search(WT_CURSOR *cursor)
         F_MASK(cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT);
 
 err:
+    CURSOR_REPOSITION_END(cursor, session);
     API_END_RET(session, ret);
 }
 
diff --git a/src/cursor/cur_std.c b/src/cursor/cur_std.c
index 0b665c604..c884aec79 100644
--- a/src/cursor/cur_std.c
+++ b/src/cursor/cur_std.c
@@ -1139,7 +1139,7 @@ __wt_cursor_largest_key(WT_CURSOR *cursor)
     F_SET(cursor, WT_CURSTD_KEY_ONLY);
 
     /* Call btree cursor prev to get the largest key. */
-    WT_ERR(__wt_btcur_prev(cbt, false, false));
+    WT_ERR(__wt_btcur_prev(cbt, false));
 
     /* Copy the key as we will reset the cursor after that. */
     WT_ERR(__wt_buf_set(session, key, cursor->key.data, cursor->key.size));
diff --git a/src/cursor/cur_table.c b/src/cursor/cur_table.c
index 3f6d53db4..ea6e81675 100644
--- a/src/cursor/cur_table.c
+++ b/src/cursor/cur_table.c
@@ -361,9 +361,11 @@ __curtable_next(WT_CURSOR *cursor)
 
     ctable = (WT_CURSOR_TABLE *)cursor;
     JOINABLE_CURSOR_API_CALL(cursor, session, next, NULL);
+    CURSOR_REPOSITION_ENTER(cursor, session);
     APPLY_CG(ctable, next);
 
 err:
+    CURSOR_REPOSITION_END(cursor, session);
     API_END_RET(session, ret);
 }
 
@@ -414,9 +416,11 @@ __curtable_prev(WT_CURSOR *cursor)
 
     ctable = (WT_CURSOR_TABLE *)cursor;
     JOINABLE_CURSOR_API_CALL(cursor, session, prev, NULL);
+    CURSOR_REPOSITION_ENTER(cursor, session);
     APPLY_CG(ctable, prev);
 
 err:
+    CURSOR_REPOSITION_END(cursor, session);
     API_END_RET(session, ret);
 }
 
@@ -452,9 +456,11 @@ __curtable_search(WT_CURSOR *cursor)
 
     ctable = (WT_CURSOR_TABLE *)cursor;
     JOINABLE_CURSOR_API_CALL(cursor, session, search, NULL);
+    CURSOR_REPOSITION_ENTER(cursor, session);
     APPLY_CG(ctable, search);
 
 err:
+    CURSOR_REPOSITION_END(cursor, session);
     API_END_RET(session, ret);
 }
 
diff --git a/src/cursor/cur_version.c b/src/cursor/cur_version.c
index 292abd63b..4088a8dec 100644
--- a/src/cursor/cur_version.c
+++ b/src/cursor/cur_version.c
@@ -500,7 +500,7 @@ __curversion_search(WT_CURSOR *cursor)
 
     /* Do a search and position on the key if it is found */
     F_SET(file_cursor, WT_CURSTD_KEY_ONLY);
-    WT_ERR(__wt_btcur_search(cbt, false));
+    WT_ERR(__wt_btcur_search(cbt));
     WT_ASSERT(session, F_ISSET(file_cursor, WT_CURSTD_KEY_INT));
 
     /*
diff --git a/src/include/api.h b/src/include/api.h
index 14b26fbfe..6cc770278 100644
--- a/src/include/api.h
+++ b/src/include/api.h
@@ -275,3 +275,19 @@
     TXN_API_END(s, ret, retry)
 
 #define CURSOR_UPDATE_API_END(s, ret) CURSOR_UPDATE_API_END_RETRY(s, ret, true)
+
+/*
+ * Calling certain top level APIs allows for internal repositioning of cursors to facilitate
+ * eviction of hot pages. These macros facilitate tracking when that is OK.
+ */
+#define CURSOR_REPOSITION_ENTER(c, s)                        \
+    do {                                                     \
+        if ((s)->api_call_counter == 1)                      \
+            F_SET((c), WT_CURSTD_EVICT_REPOSITION);
+
+#define CURSOR_REPOSITION_END(c, s)             \
+    if ((s)->api_call_counter == 1)             \
+        F_CLR((c), WT_CURSTD_EVICT_REPOSITION); \
+    }                                           \
+    while (0)                                   \
+        ;
diff --git a/src/include/extern.h b/src/include/extern.h
index 0a7955577..2ced1b6b5 100644
--- a/src/include/extern.h
+++ b/src/include/extern.h
@@ -273,13 +273,13 @@ extern int __wt_btcur_insert_check(WT_CURSOR_BTREE *cbt)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_modify(WT_CURSOR_BTREE *cbt, WT_MODIFY *entries, int nentries)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern int __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating, bool evict_reposition)
+extern int __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_next_prefix(WT_CURSOR_BTREE *cbt, WT_ITEM *prefix, bool truncating)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_next_random(WT_CURSOR_BTREE *cbt)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern int __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating, bool evict_reposition)
+extern int __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_range_truncate(WT_CURSOR_BTREE *start, WT_CURSOR_BTREE *stop)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
@@ -288,8 +288,7 @@ extern int __wt_btcur_remove(WT_CURSOR_BTREE *cbt, bool positioned)
 extern int __wt_btcur_reserve(WT_CURSOR_BTREE *cbt)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_reset(WT_CURSOR_BTREE *cbt) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern int __wt_btcur_search(WT_CURSOR_BTREE *cbt, bool evict_reposition)
-  WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
+extern int __wt_btcur_search(WT_CURSOR_BTREE *cbt) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_search_near(WT_CURSOR_BTREE *cbt, int *exactp)
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_btcur_search_prepared(WT_CURSOR *cursor, WT_UPDATE **updp)
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index fd2aa9810..2d80296b7 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -710,22 +710,23 @@ struct __wt_cursor {
 #define	WT_CURSTD_DUMP_PRETTY		0x00000400u
 #define	WT_CURSTD_DUMP_PRINT		0x00000800u
 #define	WT_CURSTD_DUP_NO_VALUE          0x00001000u
-#define	WT_CURSTD_HS_READ_ALL		0x00002000u
-#define	WT_CURSTD_HS_READ_COMMITTED	0x00004000u
-#define	WT_CURSTD_IGNORE_TOMBSTONE	0x00008000u
-#define	WT_CURSTD_JOINED		0x00010000u
-#define	WT_CURSTD_KEY_EXT		0x00020000u /* Key points out of tree. */
-#define	WT_CURSTD_KEY_INT		0x00040000u /* Key points into tree. */
-#define	WT_CURSTD_KEY_ONLY		0x00080000u
-#define	WT_CURSTD_META_INUSE		0x00100000u
-#define	WT_CURSTD_OPEN			0x00200000u
-#define	WT_CURSTD_OVERWRITE		0x00400000u
-#define	WT_CURSTD_PREFIX_SEARCH		0x00800000u
-#define	WT_CURSTD_RAW			0x01000000u
-#define	WT_CURSTD_RAW_SEARCH		0x02000000u
-#define	WT_CURSTD_VALUE_EXT		0x04000000u /* Value points out of tree. */
-#define	WT_CURSTD_VALUE_INT		0x08000000u /* Value points into tree. */
-#define WT_CURSTD_VERSION_CURSOR	0x10000000u /* Version cursor. */
+#define	WT_CURSTD_EVICT_REPOSITION     0x00002000u
+#define	WT_CURSTD_HS_READ_ALL		0x00004000u
+#define	WT_CURSTD_HS_READ_COMMITTED	0x00008000u
+#define	WT_CURSTD_IGNORE_TOMBSTONE	0x00010000u
+#define	WT_CURSTD_JOINED		0x00020000u
+#define	WT_CURSTD_KEY_EXT		0x00040000u /* Key points out of tree. */
+#define	WT_CURSTD_KEY_INT		0x00080000u /* Key points into tree. */
+#define	WT_CURSTD_KEY_ONLY		0x00100000u
+#define	WT_CURSTD_META_INUSE		0x00200000u
+#define	WT_CURSTD_OPEN			0x00400000u
+#define	WT_CURSTD_OVERWRITE		0x00800000u
+#define	WT_CURSTD_PREFIX_SEARCH		0x01000000u
+#define	WT_CURSTD_RAW			0x02000000u
+#define	WT_CURSTD_RAW_SEARCH		0x04000000u
+#define	WT_CURSTD_VALUE_EXT		0x08000000u /* Value points out of tree. */
+#define	WT_CURSTD_VALUE_INT		0x10000000u /* Value points into tree. */
+#define WT_CURSTD_VERSION_CURSOR	0x20000000u /* Version cursor. */
 /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */
 #define	WT_CURSTD_KEY_SET	(WT_CURSTD_KEY_EXT | WT_CURSTD_KEY_INT)
 #define	WT_CURSTD_VALUE_SET	(WT_CURSTD_VALUE_EXT | WT_CURSTD_VALUE_INT)
