WT-4028 Don't check for a modified page without holding the ref locked
https://github.com/wiredtiger/wiredtiger/pull/4014