Added pattern if loop and bookmarks overlap

Part of #96 work