add exception safety for fetching R Markdown positions (for desktop Shiny docs)