Added more diagnostics for overlapping bookmarks, and code that attempts to preserve them.