It looks odd to me that the main function here (getting a btree handle) doesn't match the name.

My suggestion is that if you make the other change (only incrementing the connection dhandle_dead count inside `__wt_conn_btree_sync_and_close`), then `__wt_conn_btree_get` could check that count on entry and call `__conn_dhandle_sweep` directly, then there would be no need for a public `__wt_conn_dhandle_sweep` function.